APIs & Integrations

THammer
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Attaching pdfs to transactional emails

Résolue

Hi,

We are looking into sending transactional emails from HubSpot, either through SMTP og single-send.

 

In order to do so, we will need to be able to attach pdfs; both static and dynamic ones. According to this blog post from HubSpot in 2020, "The SMTP API gives you the unique ability to add attachments, including PDFs", but we cannot find any documentation to support this.

My questions are:

 

(1) is it possible to attach pdfs to transactional emails? (not just by adding a link to a static file)? If I've understood it correctly, HubSpot's SMTP API works by simply providing the server, so it should be possible to do this when designing the email.


(2) is it possible to add any kind of pdf to a transactional email through single-send? I.e. so that we could create a unique pdf per transactional email externally and attach it? 

 

1 Solution acceptée
coldrickjack
Solution
Contributeur de premier rang

Attaching pdfs to transactional emails

Résolue

Hey @THammer,

 

I am the author of that article, I originally shared it on LinkedIn whilst I was working at HubSpot (no longer working there) and decided to put it up on the developer blog.

 

It's true that you can add attachments to transactional emails but only if you are using the SMTP API. It doesn't work if you use the Single Send API. As a rule of thumb any emails built within the HubSpot email editor don't support attachments whether they're marketing or transactional. The UI doesn't allow for it.

 

To answer your questions specifically:

 

My questions are:

 

(1) is it possible to attach pdfs to transactional emails? (not just by adding a link to a static file)? If I've understood it correctly, HubSpot's SMTP API works by simply providing the server, so it should be possible to do this when designing the email. - Yes, but only using the SMTP API. With the SMTP API you have full and total control of the email and are simply using HubSpot SMTP as the mechanism to send and track.


(2) is it possible to add any kind of pdf to a transactional email through single-send? I.e. so that we could create a unique pdf per transactional email externally and attach it? No, not as an attachment. The workaround if you are using Single Send API is to generate a link to a PDF file and include it as a custom token in the body of your email. It's not a true attachment in that sense but at least the recipient has a link to the file that is specific to them. 

 

In short if you want to include attachments, it's possible but only with the SMTP API.

Voir la solution dans l'envoi d'origine

0 Votes
1 Réponse
coldrickjack
Solution
Contributeur de premier rang

Attaching pdfs to transactional emails

Résolue

Hey @THammer,

 

I am the author of that article, I originally shared it on LinkedIn whilst I was working at HubSpot (no longer working there) and decided to put it up on the developer blog.

 

It's true that you can add attachments to transactional emails but only if you are using the SMTP API. It doesn't work if you use the Single Send API. As a rule of thumb any emails built within the HubSpot email editor don't support attachments whether they're marketing or transactional. The UI doesn't allow for it.

 

To answer your questions specifically:

 

My questions are:

 

(1) is it possible to attach pdfs to transactional emails? (not just by adding a link to a static file)? If I've understood it correctly, HubSpot's SMTP API works by simply providing the server, so it should be possible to do this when designing the email. - Yes, but only using the SMTP API. With the SMTP API you have full and total control of the email and are simply using HubSpot SMTP as the mechanism to send and track.


(2) is it possible to add any kind of pdf to a transactional email through single-send? I.e. so that we could create a unique pdf per transactional email externally and attach it? No, not as an attachment. The workaround if you are using Single Send API is to generate a link to a PDF file and include it as a custom token in the body of your email. It's not a true attachment in that sense but at least the recipient has a link to the file that is specific to them. 

 

In short if you want to include attachments, it's possible but only with the SMTP API.

0 Votes