Skip to content

Email / SMTP Configuration

RAMP uses email for:

  • Password reset links (RAMP native users)
  • User invitation emails
  • MFA setup notifications
  • System notifications (future)

Email configuration is optional but highly recommended for production deployments.

  • SMTP server access (Gmail, Office 365, SendGrid, custom SMTP)
  • SMTP credentials (username and password)
  • Network access from RAMP server to SMTP server

{
"Smtp": {
"Host": "smtp.gmail.com",
"Port": 587,
"EnableSsl": true,
"Username": "noreply@yourcompany.com",
"Password": "your-smtp-password",
"FromAddress": "noreply@yourcompany.com",
"FromName": "RAMP System"
}
}
SettingRequiredDescriptionExample
HostYesSMTP server hostnamesmtp.gmail.com
PortYesSMTP server port587 (STARTTLS) or 465 (SSL)
EnableSslYesUse SSL/TLS encryptiontrue (recommended)
UsernameYesSMTP authentication usernamenoreply@yourcompany.com
PasswordYesSMTP authentication password(app password or account password)
FromAddressYesEmail address in “From” fieldnoreply@yourcompany.com
FromNameNoDisplay name in “From” fieldRAMP System

  1. Enable 2-Step Verification

    Go to https://myaccount.google.com/security and enable 2-Step Verification.

  2. Create App Password

    1. Go to https://myaccount.google.com/apppasswords
    2. Select “Mail” and “Other (custom name)”
    3. Enter “RAMP” as the name
    4. Click “Generate”
    5. Copy the 16-character password
  3. Configure RAMP

    {
    "Smtp": {
    "Host": "smtp.gmail.com",
    "Port": 587,
    "EnableSsl": true,
    "Username": "your-email@gmail.com",
    "Password": "app-password-from-google",
    "FromAddress": "your-email@gmail.com",
    "FromName": "RAMP System"
    }
    }

Gmail Limits:

  • 500 emails per day (free accounts)
  • 2,000 emails per day (Google Workspace)

Terminal window
cd src/RAMP.API
dotnet user-secrets set "Smtp:Password" "your-smtp-password"

  1. Create a test user with RAMP native authentication
  2. Navigate to Admin -> Users
  3. Find the test user
  4. Click Reset Password
  5. Check the user’s email inbox for reset email

Start RAMP and check logs for:

[INFO] SMTP configured: smtp.gmail.com:587
[INFO] Email sent to: testuser@example.com
Terminal window
$smtp = New-Object Net.Mail.SmtpClient("smtp.gmail.com", 587)
$smtp.EnableSsl = $true
$smtp.Credentials = New-Object System.Net.NetworkCredential("your-email@gmail.com", "app-password")
$smtp.Send("your-email@gmail.com", "test@example.com", "Test", "Test email from RAMP")

RAMP includes built-in email templates for:

  • Subject: “Password Reset Request - RAMP”
  • Content: Reset link with 24-hour expiration
  • Subject: “Multi-Factor Authentication Enabled - RAMP”
  • Content: Confirmation and backup code reminder
  • Subject: “Welcome to RAMP”
  • Content: Account created, next steps

Check 1: Verify SMTP configuration

Terminal window
# Test SMTP connection
telnet smtp.gmail.com 587

Check 2: Check application logs for email errors

Check 3: Verify credentials

  • Ensure username and password are correct
  • For Gmail, use App Password (not account password)
  • Check if 2FA is enabled on email account

Check 1: Verify username format

  • Gmail: your-email@gmail.com
  • Office 365: your-email@yourdomain.com
  • SendGrid: Always apikey (literal string)

Check 2: Check password

  • Gmail: Use 16-character app password (no spaces)
  • SendGrid: Use full API key starting with SG.
  • Office 365: Use account password or app password

”Connection refused” or “Timeout” error

Section titled “”Connection refused” or “Timeout” error”

Check 1: Verify port and SSL settings

  • Port 587: Use EnableSsl = true
  • Port 465: Use EnableSsl = true
  • Port 25: Use EnableSsl = false (not recommended)

Check 2: Check firewall

Terminal window
# Test outbound SMTP connection
nc -zv smtp.gmail.com 587

Check 3: Verify network access

  • Ensure RAMP server can reach SMTP server
  • Check both host firewall and network firewalls

Fix 1: Verify sender address

  • Use a real, verified email address
  • Avoid generic addresses like noreply@gmail.com

Fix 2: Set up SPF and DKIM records

  • Configure DNS records for your domain
  • See SendGrid/SES documentation

Fix 3: Use professional email provider

  • SendGrid, Amazon SES provide better deliverability
  • Include proper email headers

  1. Use SSL/TLS — Always set EnableSsl = true and use port 587 or 465
  2. Dedicated Email Account — Create a dedicated email account for RAMP, separate from personal/admin accounts
  3. Strong Authentication — Enable 2FA on email account, use app passwords instead of account passwords, rotate credentials regularly
  4. Secure Credential Storage — Never commit SMTP passwords to source control
  5. Monitor Email Activity — Review sent email logs, set up alerts for unusual activity, check for failed delivery attempts
  6. Rate Limiting — Be aware of provider limits (Gmail: 500/day, Office 365: 10,000/day, SendGrid: varies by plan)

No. Email is optional, but password reset functionality requires it.

Yes. Set Smtp:FromAddress to any address you control and have verified with your SMTP provider.

Not currently. RAMP uses one SMTP configuration. This may be added in a future release.

How do I test without sending real emails?

Section titled “How do I test without sending real emails?”

Use a service like MailHog or Papercut SMTP for local development.