---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/sendgrid/for-developers/sending-email/ssmtp#article
headline: ssmtp
description: Learn to use SendGrid as an SMTP relay for Ssmtp. Follow our guide to add parameters to the ssmtp.conf file seamlessly.
url: https://www.twilio.com/docs/sendgrid/for-developers/sending-email/ssmtp
inLanguage: en
dateModified: 2026-07-17T03:36:59.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# ssmtp

You can use Twilio SendGrid as the SMTP relay for ssmtp, a lightweight mail transfer agent for Unix-like systems. To add SendGrid as an SMTP relay for ssmtp, edit `/etc/ssmtp/ssmtp.conf` and add the following:

```bash
mailhub=smtp.sendgrid.net:587
AuthUser=apikey
AuthPass=sendgridapikey
UseSTARTTLS=YES
```

Your changes will come into effect as soon as the next message is sent via `ssmtp`.
