APIs & Integrations

bvstone
Member

SMTP API Not delivering Email

SOLVE

I am working with a customer to interace with HubSpot on an IBM i (AS400) system.

 

I created an email token, got the user and password, and tried to send an email using that information.

 

All logs connecting to the HubSpot SMTP relay say the email was accepted and queued for delivery, but I didn't receive it (yes, I checked spam as well).

 

I also don't see a history of the email in the dashboard for the account.

 

Here's a log of the communications:

Attempting to connect to server smtp.hubapi.com on port 587....
Waiting for connection...
Connection to server smtp.hubapi.com on port 587 succeeded!
<smtp.hubapi.com says:> 220 smtp.hubapi.com ESMTP R6H7kfThjW17s7df6K-Bj-0 - hssmtp
Sending EHLO command to smtp.hubapi.com.
<MAILTOOL says:> EHLO xxxxx
<smtp.hubapi.com says:> 250-smtp.hubapi.com at your service, [/172.16.31.222:25234]
Sending STARTTLS command.
<MAILTOOL says:> STARTTLS
<smtp.hubapi.com says:> 220 2.0.0 Ready to start TLS R6H7kfThjW17s7df6K-Bj-0 - hssmtp
SSL handshake succeeded!
Sending EHLO command to smtp.hubapi.com.
<MAILTOOL says:> EHLO xxxxxxx
<smtp.hubapi.com says:> 250-smtp.hubapi.com at your service, [/172.16.31.222:25234]
Sending AUTH LOGIN command.
<MAILTOOL says:> AUTH LOGIN
Sending User ID.
<smtp.hubapi.com says:> 334 VXNlcm5hbWU6 R6H7kfThjW17s7df6K-Bj-0 - hssmtp
<MAILTOOL says:> [user removed]
<smtp.hubapi.com says:> 334 UGFzc3dvcmQ6 R6H7kfThjW17s7df6K-Bj-0 - hssmtp
Sending Password.
<MAILTOOL says:> [password removed]
<smtp.hubapi.com says:> 235 2.0.0 Authentication successful. R6H7kfThjW17s7df6K-Bj-0 - hssmtp
<MAILTOOL says:> MAIL FROM: <email address removed>
<smtp.hubapi.com says:> 250 2.0.0 Sender address accepted. R6H7kfThjW17s7df6K-Bj-0 - hssmtp
<MAILTOOL says:> RCPT TO: <receipient removed>
<smtp.hubapi.com says:> 250 2.0.0 250 Recipient address accepted. R6H7kfThjW17s7df6K-Bj-0 - hssmtp
Sending <DATA> to start message.
<MAILTOOL says:> DATA
<smtp.hubapi.com says:> 354 Continue R6H7kfThjW17s7df6K-Bj-0 - hssmtp
<--MIME DATA [210 bytes]-->
Sending <.CRLF> to end message.
<MAILTOOL says:> .
<smtp.hubapi.com says:> 250 2.0.0 Ok queued as 1549549116344/e719b4af-6e4b-4cd3-94d3-a1491efa0c36 R6H7kfThjW17s7df6K-Bj-0 - hssmtp
Sending QUIT command to smtp.hubapi.com.
<MAILTOOL says:> QUIT
<smtp.hubapi.com says:> 221 2.0.0 cheers R6H7kfThjW17s7df6K-Bj-0 - hssmtp
0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Hi, @cjbaker.

 

Sincere apologies for the delayed response. I appreciate your patience while our team investigated your reports.

 

We checked our logs for the messages we discussed above. In both cases, we recorded a "Missing at least one required body: 'html' or 'text'" message, which indicates the message either lacked content or wasn't formatted properly.

 

Could you confirm that you included content for the email's body and provide an example of a message you passed to the SMTP API?

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
21 Replies 21
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Hi, @bvstone.

 

Happy to help investigate. Could you share a link to the contact record to which you attempted to send the email? (I just need to know the client's Hub ID and email address, so this is one way you can send it to me without posting on this public forum.)

Isaac Takushi

Associate Certification Manager
0 Upvotes
bvstone
Member

SMTP API Not delivering Email

SOLVE

@IsaacTakushi,

 

It was an email address that was used.  I don't believe it's set up as a contact in my customer's account.  I didn't want to post the email here for spambots to collect.  🙂

 

[redacted]

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Totally fair, @bvstone. Thanks for sharing. I've redacted the email so there's even less risk of that Smiley Wink

 

Could you still specify your client's Hub ID, though?

Isaac Takushi

Associate Certification Manager
0 Upvotes
bvstone
Member

SMTP API Not delivering Email

SOLVE

@IsaacTakushi 

 

2618299

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Hey, @bvstone.

 

Apologies for the delayed response.

 

My internal tool is showing 4 successful transactional email deliveries from account 2618299 to the email you specified on Thursday, 7 February 2019.

 

Indeed, all four messages were opened at one point, so they were delivered to someone.

Isaac Takushi

Associate Certification Manager
0 Upvotes
bvstone
Member

SMTP API Not delivering Email

SOLVE

@IsaacTakushi, those emails you mentioned were sent using the Single Send Email api, not the SMTP API.  The Single Send API I have working just fine.

 

With the SMTP API (which this post is about) you send email by directing your email client to use the server and credentials specified by HubSpot after setting up credentials/SMTP tokens for a user.

 

As you can see in the original post, that is the connection that was made, the user and password that was set up was used, and the mail server accepted the email for delivery.

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Sorry about that, @bvstone. I forgot we were discussing the SMTP API. I'll dig into this further.

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Thanks for your continued patience, @bvstone.

 

I haven't been able to uncover the issue yet, but I wanted to confirm whether you've tried resetting your SMTP token yet? Could you go ahead and do that and let me know if you receive the same response but no tracking?

 

If you're still experiencing the issue after this step, I'll loop in one of our email deliverability consults for further investigation.

Isaac Takushi

Associate Certification Manager
0 Upvotes
cjbaker
Member

SMTP API Not delivering Email

SOLVE

Hello, I'm having the same problem with the SMTP API. I'm using Python's smtplib, which works fine when I use another server and account, like gmail for example. My company has the transactional email add-on.

 

Like bvstone, I'm connecting to smtp.hubapi.com , although I'm using STARTTLS on port 587 (as documented here https://developers.hubspot.com/docs/methods/email/transactional_email/smtpapi_overview/list/create). I'm able to connect to the SMTP server, login, and send the message with no errors, but the email is not received, and it does not show up in Hubspot under the contact's email history. I've tried manually sending a transactional email with the same sender and recipient through the Hubspot web interface, and it works correctly. I've tried resetting the token's password. Why can't I send a message through SMTP?

0 Upvotes
cjbaker
Member

SMTP API Not delivering Email

SOLVE

I just wanted to add that I tried running the Python code on the Hubspot documentation page linked to in my previous post, just changing TO_EMAIL to my address, and I did not receive the message. I checked my spam box. The script reports success, with "Enqueued email send...". Note that this script uses the demo portal. The functionality appears to be broken.

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Thanks for all this information, @cjbaker.

 

The one part I need to investigate further is the contact's email address. If you send me a link to the contact in your account, that'll be enough.

Isaac Takushi

Associate Certification Manager
0 Upvotes
cjbaker
Member

SMTP API Not delivering Email

SOLVE

Hi @IsaacTakushi I don't seem to be able to send you a private message, so I'm posting the link: https://app.hubspot.com/contacts/4871527/contact/15351/?interaction=note

 

Thanks for your help.

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Thanks for this information, @cjbaker.

 

My colleague Andreas has let me know he is working with you in a support ticket. I'll be assisting him on my end to get to the bottom of your issue!

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Hi, @cjbaker.

 

Sincere apologies for the delayed response. I appreciate your patience while our team investigated your reports.

 

We checked our logs for the messages we discussed above. In both cases, we recorded a "Missing at least one required body: 'html' or 'text'" message, which indicates the message either lacked content or wasn't formatted properly.

 

Could you confirm that you included content for the email's body and provide an example of a message you passed to the SMTP API?

Isaac Takushi

Associate Certification Manager
0 Upvotes
kaliz
Member

SMTP API Not delivering Email

SOLVE

Hi,

 

I have the same problem.

I think my SMTP API in correctly configured but my emails are not received.

I send html emails.

 

Could you take a look ?

Thanks

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Hi, @kaliz.

 

Apologies for the delayed response.

 

Happy to help investigate. Could you clarify the following?

  • Do you have logs of the SMTP handshake from your end, as the original poster shared? Do you encounter any errors?
  • Have you tried reseting your SMTP tokens? Does the issue persist?
  • Could you share a link to the contact record to which you attempted to send the email? (I just need to know the client's Hub ID and email address, so this is one way you can send it to me without posting on this public forum.)
  • Related to the above, approximately when did you attempt to send the last email to this contact?

Isaac Takushi

Associate Certification Manager
0 Upvotes
bvstone
Member

SMTP API Not delivering Email

SOLVE

@IsaacTakushi 

 

I did just try resetting the token/password.  I tried again.  The SMTP server reported:

 

02/13/2019 14:25:57 - 250 2.0.0 Ok queued as 1550090317383/ba5ae739-d697-483c-925f-bcf80df98e1e R6H8vWS5JW5gnfLG7GHX6L0 - hssmtp

 

Just as before, it says the email is queued for delivery, but it's never sent.

 

Does the email need to come from a specific allowlisted IP address, or something else?

 

 

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Thanks for confirming, @bvstone.

 

I don't believe it needs to come from a allowlisted IP address if you have the correct token and password.

 

I'll investigate further with my team. Am I correct in believing you tested again with the same contact as earlier?

Isaac Takushi

Associate Certification Manager
0 Upvotes
bvstone
Member

SMTP API Not delivering Email

SOLVE

@IsaacTakushi yes... the email was sent to bvstone at bvstools dot com.

 

The last message I sent had an email ID that you should be able to find in your SMTP server's logs.  If not and you need to turn on some debugging, let me know and I can send another test.

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

SMTP API Not delivering Email

SOLVE

Hey, @bvstone.

 

I've shared the details of your issue with the email team. We'll be digging in further on our end.

 

That said, I've realized you said you reset the password of the SMTP token you created on 2/7/19 but didn't deactivate that token and create a new one. The latter is what I meant to ask on 2/13/9, but I realize the question could have been much clearer.

 

Could you generate a new SMTP token on this page, delete token 69689745, and then try sending another email to yourself with the newly generated token?

Isaac Takushi

Associate Certification Manager
0 Upvotes