SMTP
  • 02 May 2023
  • 3 Minutes to read
  • Dark
    Light

SMTP

  • Dark
    Light

Article Summary

SMTP, or Simple Mail Transfer Protocol, is a set of rules used to send emails over the internet. In Torq, you can use SMTP to send emails from your email application, like Gmail or Microsoft 365, directly from your Torq workflows. 

SMTP allows the app to send emails by connecting to your mail server. This makes sure your messages get delivered to the right people. With this feature, you can easily send emails straight from the app, without needing a separate email program.

SMTP server settings

Email providerServerPort
Microsoft 365smtp.office365.com587
Outlooksmtp-mail.outlook.com587
Gmailsmtp.gmail.comSSL: 465; TLS: 587

SMTP message components

An SMTP message contains a header and a body.

Header

The header contains information about the email. 

  • Sender: sender's email address.
  • Recipient: recipients' email addresses.
  • Subject: email subject
  • Date (optional): email date.
  • Cc(optional): CC recipients' email addresses.
  • Bcc(optional): BCC recipients' email addresses.
  • Reply-To(optional): email addresses the email in reply to.

Basic header

This email is a simple message reminding the recipient, Jane, about a meeting.

From: john.doe@example.com
To: jane.smith@example.com
Subject: Meeting Reminder
Date: Tue, 01 May 2023 09:00:00 -0400

Hi Jane,
Just a quick reminder about our meeting this afternoon at 3 PM.
Best,
John

Cc header

This email contains a project update and is sent to Jane, with Peter copied (Cc) on the message.

From: john.doe@example.com
To: jane.smith@example.com
Cc: peter.brown@example.com
Subject: Project Update
Date: Tue, 01 May 2023 10:00:00 -0400

Hello Jane and Peter,
Please find the latest project update attached to this email.
Best regards,

Bcc header

This email is a request for a private discussion with Jane, and includes a blind carbon copy (Bcc) sent to a confidential email address.

From: john.doe@example.com
To: jane.smith@example.com
Bcc: confidential@example.com
Subject: Private Discussion
Date: Tue, 01 May 2023 13:00:00 -0400

Hi Jane,
I'd like to discuss a confidential matter with you. Please let me know when you're available for a private conversation.
Kind regards,
John

In-Reply-To header

This email is a response to a previous message from Jane about a vacation request, using the "In-Reply-To" header to reference the original message.

From: john.doe@example.com
To: jane.smith@example.com
Subject: Re: Vacation Request
In-Reply-To: <unique-message-id@example.com>
Date: Tue, 01 May 2023 11:00:00 -0400

Hi Jane,
Thank you for approving my vacation request. I'll be sure to complete my tasks before leaving.
Regards,
John

Reply-To header

This email is an RSVP confirmation for an event, with a "Reply-To" header directing responses to a specific events email address.

From: john.doe@example.com
To: jane.smith@example.com
Subject: RSVP Confirmation
Reply-To: events@example.com
Date: Tue, 01 May 2023 12:00:00 -0400

Dear Jane,
I'm happy to confirm my attendance at the upcoming event. Please let the events team know.
Sincerely,
John

Body

The body contains the actual content of the email message. It can be plain text or HTML, depending on the preferences of the sender and the capabilities of the recipient's email service.

Advanced formatting

For more advanced formatting, such as including attachments, rich text, or non-ASCII characters, the MIME (Multipurpose Internet Mail Extensions) standard is used in conjunction with SMTP to extend its capabilities. MIME allows for the encoding and decoding of various content types within email messages, enabling more complex formatting and the inclusion of multimedia elements.

Rich-text (HTML)

From: john.doe@example.com
To: jane.smith@example.com
Subject: Greetings
Date: Tue, 01 May 2023 14:00:00 -0400
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8

<html>
<head></head>
<body>
<p>Hello <strong>Jane</strong>,</p>
<p>Wishing you a <em>great</em> day!</p>
<p>Best regards,<br>John</p>
</body>
</html>

Attachment

From: john.doe@example.com
To: jane.smith@example.com
Subject: Project Files
Date: Tue, 01 May 2023 15:00:00 -0400
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="BOUNDARY"

--BOUNDARY
Content-Type: text/plain; charset=UTF-8

Hi Jane,
Please find the project files attached.

Best,
John

--BOUNDARY
Content-Type: application/pdf; name="project.pdf"
Content-Disposition: attachment; filename="project.pdf"
Content-Transfer-Encoding: base64

BASE64_ENCODED_ATTACHMENT_DATA
--BOUNDARY--

Non-ASCII characters

From: john.doe@example.com
To: jane.smith@example.com
Subject: Foreign Language Example
Date: Tue, 01 May 2023 16:00:00 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8

こんにちは Jane,

これは日本語で書かれたメールです。

よろしくお願いします,
John

Create an SMTP integration in Torq

  1. Go to the Integrations page, locate and click the SMTP card, and click Add.
  2. Fill out all of the fields in the New Integration window. Refer to the SMTP server settings for your email application.
⚠️ If you're using Gmail, the password must be an app password. For more information, consult the Google documentation.

smtp-integration



Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.