SMTP Email

Send emails via any SMTP server (Gmail, Outlook, custom mail servers).

Overview

SMTP (Simple Mail Transfer Protocol) is the underlying protocol every email server speaks. The SMTP Email connector lets your workflows send messages through any SMTP host, including Gmail, Outlook 365, Amazon SES, Mailgun, or a self-hosted Postfix relay. It is the right choice when you need to send from an existing corporate mailbox rather than a dedicated transactional provider.

In Spojit, SMTP is most often used as the outbound channel for internal-facing emails (reports, alerts, approvals) that should appear to come from a real teammate or shared inbox. For high-volume transactional mail to customers, prefer Resend; for low-volume internal sends from an existing mailbox, SMTP is simpler.

What You Can Do

The SMTP connector exposes these tools:

  • send-email - send a single email with to/cc/bcc, subject, plain text or HTML body, and attachments.
  • verify-connection - test that the configured host, port, credentials, and TLS settings can authenticate.

Authentication

SMTP uses a host, port, username, and password, plus a TLS setting. Collect these from your email provider:

  • Gmail: host smtp.gmail.com, port 587 (STARTTLS), username is your Google address, password is an App Password generated under Google Account -> Security -> App passwords.
  • Outlook 365: host smtp.office365.com, port 587, username is your mailbox, password is an App Password.
  • Amazon SES: host email-smtp.<region>.amazonaws.com, port 587, SMTP credentials generated in the SES console.
  • Self-hosted: whatever your mail admin configured (often port 465 for implicit TLS).

Setting Up Your Connection

  1. Collect host, port, username, password, and the TLS mode (STARTTLS on 587, or implicit TLS on 465) from your provider.
  2. If using Gmail or Outlook, generate an App Password instead of using your account password.
  3. In Spojit, go to Connections from the sidebar.
  4. Click + Add Connection and search for SMTP Email.
  5. Enter the host, port, username, password, and select the TLS mode.
  6. Name the connection (for example, SMTP - reports@company.com) and click Save.
  7. Run verify-connection in a quick test workflow to confirm the credentials work before going live.

Using in a Workflow

Use Direct Mode for all SMTP sends. The connector exposes only two tools, so Agent Mode adds little. Build the subject and body in upstream Transform or AI steps, then pass them to send-email.

Tips

  • Always use App Passwords for Gmail and Outlook; account passwords will fail if two-factor authentication is enabled.
  • Port 587 with STARTTLS is the modern default; only use 465 if the provider explicitly requires implicit TLS.
  • The from address must match (or be authorised to send as) the authenticated mailbox; otherwise the message will be rejected or dropped to spam.
  • Call verify-connection once after setup and again whenever a send starts failing, before re-testing the whole workflow.
  • For attachments, the connector accepts base64-encoded content with a filename and MIME type.

Common Pitfalls

  • Gmail enforces a sending limit of roughly 500 messages per day for free accounts and 2,000 for Workspace; use Resend for bulk sends.
  • Some shared SMTP relays silently rewrite the from address; check actual delivery before assuming the sender is correct.
  • Self-signed TLS certificates on internal relays may need a connection option to skip verification; surface this with your mail admin.
  • SMTP errors return at send time, not at workflow design time; wrap send-email in error handling for transient 4xx responses.

Common Use Cases

Related Articles

For technical API details and field specifications, see the SMTP Email connector documentation.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.