Send email to multiple recipients from SMTP API


How do I send email to multiple recipients using the SMTP API.

I specified two different emails in CC. But the actual email CC’ed to the FIRST email twice instead.

  1. Things I tried.
    a. I initially had; And it CC’ed to twice.


@jmichaelRS The Single-Send API only allows one recipient at a time. If you have multiple ones you can loop through them in your code and call the Single-Send API multiple times.


Hi @pmanca,

FYI I am not using the single-send API, but rather the SMTP Api.

It’s a bummer that we cannot send to multiple recipients. Looping through the recipient list one at a time is not a viable solution because, the recipients would want to view the email as a single entity and also want to reply to the emails.
I am not sure why you would want to restrict recipients to a single recipient.



@jmichaelRS Ah sorry I mixed up the two APIs there. Let me reach out and make sure the answer I gave you was true for the SMTP API as well.


@jmichaelRS The SMTP API falls under the same rules as the Single-Send API where you can only send out to one email at a time.


@pmanca This seems to be a basic requirement. Any SMTP service should be able to sent emails to multiple recipients. Any idea why HubSpot is unable to do that?


@jmichaelRS The SMTP API is part of our Transactional email add on. Transactional Email by nature is a 1:1 relationship. A 1:many relationship would be a marketing email. This is set up on purpose given the intent of our SMTP API.


I understand transactional emails having a single recipient in the To list. But it is a genuine requirement to have multiple recipients in the CC list.
There are other marketing automation email vendors such as Mandrill, Sendgrid etc which allow multiple recipients for transactional emails.
Is there is a technical limitation on HubSpot other than the assumption that Transactional Email is by nature 1:1?


There is not a limit on the HubSpot side. This was a choice we made as we designed that part of our platform.


Hi @jmichaelRS and @pmanca,

The limitation you’re seeing is definitely not, by any measure, an intentional design decision. An SMTP relay must support Cc, Bcc and multiple recipients. I’m going to investigate today and see why you’re seeing what you’re seeing and get back to you.


Send single email with CC/BCC

Hi @jmichaelRS,

Do you have an example proof of concept code? I suspect the issue is that, even though you have the multiple recipients in the headers, you’re not including them in the recipient list for the smtp conversation. For example, if you were using python, the following code wouldn’t work:

import smtplib
s = smtplib.SMTP('', 587)
s.login(USER, PASS)
s.sendmail("", [""], msg)

Instead, you need to include all recipients in the RCPT list above. E.g.:

import smtplib
s = smtplib.SMTP('', 587)
s.login(USER, PASS)
s.sendmail("", ["", ""], msg)



Hi Mike,
Thanks for your clarification. I did some extensive test and research to test the various permutations of this issue. So, I got it to work finally in python.
Given below is the python code:
import requests
import urllib
import json
import smtplib

SMTP_USER = 'UserName’
SMTP_PASSWORD = ‘Password’

CC_EMAIL = [‘’, ‘’, ‘’]
def send_test_email():
server = smtplib.SMTP(“”, 587)
msg = “From: {from_}\r\nTo: {to}\r\nCC: {cc}\r\nBCC: {bcc}\r\nSubject: {subject}\r\n\r\n{body}”.format(
subject=‘HubSpot SMTP API Test-3 CC’,
body=‘test email from Transactional Email Token’
server.sendmail(FROM_EMAIL, toaddrs, msg)
print “Enqueued email send toaddrs: {toaddrs}, to: {to}, cc: {cc}, bcc: {bcc}, msg: {msg}”.format(


I was also able to get the CC working, i.e. send to multiple recipients on the CC list in C#.Net. I use the SMTP Client in C# to send emails. One Open issue though is the fact the email recipients in the CC list are duplicated when I use the SMTP client and HubSpot SMTP server. This is a HubSpot specific bug as I have tested with mandrill and writing to my local machine, and it works fine. I think it has something to do with the way HubSpot SMTP is parsing the CC email recipients. Attached is the images. If you need source code to test, I can send it separately.

Thanks a lot for your help.



Hey Johnson,

Glad to hear you’re making progress! I noticed that double Cc issue as well when testing. I’m going to get a test + fix out. If not today then hopefully by Monday. Will let you know when it’s out.



Hi @jmichaelRS,

Sorry for the delay. I wanted to close the loop here and say the fix is out and you should no longer see duplicate Cc headers.



Thanks Mike. I was about to reach out to you today :slight_smile: