Skip to content
Community forum

SendGrid (email) or SMTP (email_smtp)?

SolvedSupero SupportSupero team asked

Common question, written up by the Supero team.

We already send mail through Microsoft 365. Do we need a SendGrid account to send receipts from our app?

Link

1 answer

Accepted answer
Accepted answer

No. Import email_smtp and point it at your own server. Both services expose the same send_email operation with almost the same fields, so code written for one works against the other.

json
{"service_id": "email_smtp", "config_data": {
  "smtp_host": "smtp.office365.com", "smtp_username": "receipts@yourco.com",
  "smtp_password": "<app-specific password>", "default_from_email": "receipts@yourco.com"}}

Port 587 with STARTTLS is the default. For implicit SSL, set smtp_port: 465 and smtp_use_ssl: true. Use an app-specific password, not the account password. base_url is also required for SMTP.

What you give up is tracking. With email, SendGrid's open and click tracking is on by default (track_opens, track_clicks). SMTP has no return channel, so you get sent_at and error_message on each message record and nothing about opens, clicks or bounces. SendGrid also accepts tags, scheduled_at and message_type, which SMTP doesn't.

Supero Integrations teamSupero team answered
Link

Your answer

SendGrid (email) or SMTP (email_smtp)? | Supero Community