question

Kim Strasser avatar image
Kim Strasser asked

Client API AddOrUpdateContactEmail doesn't resend verification email

I want that the player can get a new verification email if he/she has accidentally deleted the first verification email.

For example:

A player creates a new account and adds his/her contact email address "newplayer1000@gmail.com". Now, the player gets a verification email but the player forgets to click on the link in the email. Later, the player deletes the verification email. Then, the contact email verification status is still pending in the player's account.

In my game, it's possible to change the contact email address with client API AddOrUpdateContactEmail. But when the player enters his/her current contact email address "newplayer1000@gmail.com" and when client API AddOrUpdateContactEmail is executed, then nothing happens and I don't see an error message. The player doesn't get a new verification email if he/she enters his/her current contact email address. The player only gets a new verification email when he/she enters a different contact email address.

How can the player get a new verification email if he/she will enter his/her current contact email address?

I use a rule to send a custom verification email. The rule is only executed when the player enters a different contact email address, I see a PlayStream event. If the player enters his current contact email address, then the rule is not executed, I don't see a PlayStream event.

Account Management
2 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.

Ivan Cai avatar image Ivan Cai ♦ commented ·

Can you provide the screenshot of event data of the first email sent? Please pay attention to obscure relevant private information. Since the contact email has not changed for the two times, the com.playfab.player_updated_contact_email event is not triggered, and the email will not be sent.

0 Likes 0 ·
Kim Strasser avatar image Kim Strasser Ivan Cai ♦ commented ·

I see the following events when the player enters a different contact email address. Then, the email is sent correctly.

But when the player enters his current contact email address, then there are no events and no email is sent.

0 Likes 0 ·

1 Answer

·
Kim Strasser avatar image
Kim Strasser answered

Is it normal that the com.playfab.player_updated_contact_email event is not triggered when the player tries to update his current contact email address with the same email address? Or is this a bug?

I need an event in Rules that gets always triggered when the player tries to update his contact email address.

Could I use server API SendEmailFromTemplate instead to send the verification email in CloudScript to the player? Which event type should I use in Rules in this case?

UPDATE: It works now. I check in my game if the player's current contact email is the same that he entered in the text box in my game. If it is the same contact email address, then I call PlayFabClientAPI.ExecuteCloudScript and I call SendEmailFromTemplate in my CloudScript function to send the verification email. I only send an email if the player's current contact email address is not confirmed.

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.