question

Adam El-Khayyat avatar image
Adam El-Khayyat asked

NoContactEmailAddressFound when sending an email

Hi, I'm trying to follow this tutorial in order to send out a password recovery email to a user on a title I have.

https://api.playfab.com/docs/tutorials/landing-players/using-email-templates-to-send-an-account-recovery-email

I have done all the steps but I keep getting the error:
{"code":400,"status":"BadRequest","error":"NoContactEmailAddressFound","errorCode":1325,"errorMessage":"NoContactEmailAddressFound"}

I have double checked to make sure that a valid email address of the user is provided, the user I am preforming this task on has a contact email. I have set up an email template as the tutorial states and I am using, for the time being, the email password-reset@playfab.com as my "From email address".

I am using the client SDK and I am currently using the SendAccountRecoveryEmail method with my newly made custom email template.

Last thing, the contact email is not verified, does that cause the error or is it something else I have missed completely?

Any advice is welcome,
Thanks!

10 |1200

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

Marcus Nixon avatar image
Marcus Nixon answered

Hi Adam,

The email address that you want to show in the "From" field must be an email domain that the SMTP server enables you to send emails from.

5 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.

Adam El-Khayyat avatar image Adam El-Khayyat commented ·

Hi Marcus,

That might be the issue, as the code I use for the API call of SendAccountRecoveryEmail is very straight forward. Is there anyway I can give the whole API SendAccountRecoveryEmail call a try/test without having a proper email domain setup of my own in order to send emails from?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Adam El-Khayyat commented ·

I believe the best way is still to set up a SMTP server, but I think it will be easy if you can use personal email, for example, if it is Gmail, you may use smtp.gmail.com for Host name and 587 for Port number.

1 Like 1 ·
Adam El-Khayyat avatar image Adam El-Khayyat Seth Du ♦ commented ·

Hey SethDu,

I gave your method a try. I set up a SMTP server with add-ons (https://api.playfab.com/docs/tutorials/setting-up-an-smtp-server-with-add-ons) and change the "From" field to match the gmail I have set in the SMTP server but I still seem to get the same error, any idea where I might be going wrong?

0 Likes 0 ·
Show more comments
Marcus Nixon avatar image
Marcus Nixon answered

Hi Adam,

Can you please post the code that you are using to make your API call for SendAccountRecoveryEmail?

10 |1200

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

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.