Game ideas & features

Your next feature

Email Sending

Send an email to a player using an existing template.

BASIC planRequires a player session
Unity
Your visible result

Email to the test player with a verified email is queued (pending). Then check delivery.

Send a transactional email1:20

Existing dashboard tutorial. It shows the previous design; the guide follows the current workflow.

Open video separately ↗

Build this feature

You can preview the guide. Running it requires an active project key. Prepare project

SDK installed, project configuration imported and player signed in.

BASIC, your own SMTP and an existing template are required. The recipient must be a user with verified email. An anonymous test player is insufficient.

C#
Assets/Scripts/EmailSendingDemo.cs
horizOn callSetup
1using System.Collections.Generic;
2using UnityEngine;
3using PM.horizOn.Cloud.Core;
4using PM.horizOn.Cloud.Manager;
5​
6// Attach this script to a GameObject in your first scene.
7public class EmailSendingDemo : MonoBehaviour
8{
9 async void Start()
10 {
11 // Setup: initialize, connect and sign in a player.
12 HorizonApp.Initialize();
13 await new HorizonServer().Connect();
14 await UserManager.Instance.SignUpAnonymous("PlayerName");
15​
16 // horizOn: send an email to the player and check its status.
17 // Send a transactional email to a registered app user
18 var response = await EmailSendingManager.Instance.SendEmail(
19 UserManager.Instance.CurrentUser.UserId,
20 "welcome",
21 new Dictionary<string, string> { ["username"] = "PlayerOne" },
22 "en"
23 );
24​
25 // Check the delivery status later
26 var status = await EmailSendingManager.Instance.GetEmailStatus(response.EmailId);
27 }
28}

Test your new feature.

Email to the test player with a verified email is queued (pending). Then check delivery.

Choose the same project in the dashboard as in your game configuration.

Endpoints
  • POST/email-sending/send
  • GET/email-sending/{emailId}
All endpoints in the API reference
Our suggestion for your next step

Give every round a high score.

Save the score after a round and show who's ahead. Keep using your connection and player session.