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
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?
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.)
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. 🙂
@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.
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.
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?
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.
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?
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?
@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.
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?