question

John Peterson avatar image
John Peterson asked

Problems with SMTP Add-on not working.

Dear PlayFab community,

I’m consistently getting the following error (in my Sent Mail event):

"ErrorName": "SmtpServerGeneralFailure",
"ErrorMessage": "The operation has timed out.",

I’ve put in the same SMTP credentials to this smtp testing website, and I successfully receive emails.

Any help would be much appreciated!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

According to our logs, we're getting an error when we try to call to your SMTP server. Specifically, "The remote certificate is invalid according to the validation procedure." This would indicate that there's an issue with the certificate on that server - can you have a look at that?

6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

John Peterson avatar image John Peterson commented ·

Thanks, Brendan!

Any recommendations for how I would troubleshoot this issue? It's sort of a "black box" from a user perspective. Why would something like smtper.net work successfully, but not PlayFab?

Thanks in advance for any additional help you can provide!

0 Likes 0 ·
brendan avatar image brendan John Peterson commented ·

I'm not familiar with smtper.net (and to be honest, I wouldn't use any service where you need to enter your password, out of concern for security). But the error is going to be due to either a) SSL not being enabled on the SMTP server, or b) the certificate being invalid or (more likely, if it's this road you wind up going down) not signed by a valid CA (self-signed or similar). Can you have a look at how the server is set up, security-wise?

0 Likes 0 ·
John Peterson avatar image John Peterson commented ·

I have switched to using the "secure" SMTP port, but I still get the same error in the sent_mail event. Is there any way to get greater visibility to the logs so that I can more effectively troubleshoot this issue?

I have had a chat session with the hosting provider, and they verify that the new connection information that I'm using has a valid certificate. However, I'm still getting the same error in my PlayFab sent_mail event. :-(

0 Likes 0 ·
brendan avatar image brendan John Peterson commented ·

Can you ask them to send you the details of the certificate chain, so that you can pass that on to us? I can't expose our logs, as they contain information on all games in our service. But I can tell you that the error is specifically the "remote certificate is invalid" standard error (), and that it's coming from our SSL layer, meaning it's being rejected at the stage where we're trying to establish the secure connection.

I'm not sure of the specifics of your hosting partner, but this guide may help with troubleshooting: https://blogs.msdn.microsoft.com/jpsanders/2009/09/16/troubleshooting-asp-net-the-remote-certificate-is-invalid-according-to-the-validation-procedure/

0 Likes 0 ·
John Peterson avatar image John Peterson commented ·

Dear @Brendan,

I went back to our hosting provider (InMotion.com) and forwarded your comments. The technical support representative created a new AutoSSL certificate for our domain, and after waiting about 20 minutes or so, everything looked to be "soup" on InMotion's end.

Here is an image of the mail settings as provided by InMotion. I've updated the PlayFab SMTP Add-on with this information, but I'm still failing with the same externally-reported error (timeout).

I have access to the certificate itself (I believe). What exactly do I need to send to you to help me resolve this issue?

Thanks so much for your continued help!

0 Likes 0 ·
brendan avatar image brendan John Peterson commented ·

Can you get us the complete certificate chain?

0 Likes 0 ·
Roshaan avatar image
Roshaan answered

@Brendan ,I'm trying to send an email (I have added the SMTP add-on from Addons section.)

Below is the response I get upon this request. What's the problem? My credentials are accurate that I know. Is there some settings need to be done on my server?

{
    "EventName": "sent_email",
    "EmailTemplateId": "D06C42BC63358913",
    "EmailTemplateName": "Password Changed",
    "EmailTemplateType": "Custom",
    "Success": false,
    "ErrorName": "SmtpServerAuthenticationError",
    "ErrorMessage": "Mailbox unavailable. The server response was: Access denied - Invalid HELO name (See RFC2821 4.1.1.1)",
    "EmailName": "Primary",
    "Token": "840CB609DB9754B1",
    "Subject": "Verse Hunter Password Updated",
    "Body": "<head></head>\r\n<body><p> You recently updated your password. This email is just for confirmation, please ignore and enjoy Hunting!</p>\r\n<p>Thanks!</p>",
    "Language": "en",
    "EventNamespace": "com.playfab",
    "EntityType": "player",
    "Source": "PlayFab",
    "TitleId": "EC13",
    "EntityId": "84BD864A51A4BB79",
    "EventId": "c1ae231dbcf5457c821ec16cb05302de",
    "SourceType": "BackEnd",
    "Timestamp": "2019-02-28T13:34:05.573761Z",
    "History": null,
    "CustomTags": null,
    "Reserved": null,
    "PlayFabEnvironment": {
        "Vertical": "master",
        "Cloud": "main",
        "Application": "queueprocessor",
        "Commit": "0c285e7"
    }
}
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy avatar image Andy ♦♦ commented ·

The ErrorMessage contains the information we received back from your SMTP server. There's something wrong with the credentials provided. Any changes you need to make are going to depend on the specifics of your server.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.