邮件发送

通过事务性邮件在游戏之外触达您的玩家

免费开始使用

您的SMTP,您的品牌

邮件来自您的域名。horizOn从不代您发送 -- 您完全控制可送达性和品牌形象。

带变量的模板引擎

使用{{username}}或{{eventTime}}等占位符创建可复用的HTML模板。支持多达15种语言。

立即或定时发送

立即发送邮件或安排稍后发送。随时通过API取消计划中的邮件。

专为游戏事件构建

锦标赛提醒、购买确认、不活跃提示、欢迎邮件。一次API调用触发整个流程。

快速集成

快速集成

Unity (C#)
// Unity C#: Email Sending
using System;
using System.Collections.Generic;
using PM.horizOn.Cloud.Manager;

var mail = EmailSendingManager.Instance;
string userId = UserManager.Instance.CurrentUser.UserId;

// Send now to a registered player
var sent = await mail.SendEmail(userId, "welcome",
    new Dictionary<string, string> { ["username"] = "PlayerOne" }, "en");

// Schedule a reminder for tomorrow, then cancel it
var reminder = await mail.SendEmail(userId, "appointment_reminder",
    new Dictionary<string, string> { ["appointmentName"] = "Dentist" }, "en",
    DateTime.UtcNow.AddDays(1));
if (reminder != null) await mail.CancelEmail(reminder.id);
REST
# REST API: Email Sending

# Send an immediate email
curl -X POST https://horizon.pm/api/v1/app/email-sending/send \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "USER_ID",
    "templateSlug": "welcome",
    "language": "en",
    "variables": { "username": "PlayerOne" }
  }'

# Schedule an email for later
curl -X POST https://horizon.pm/api/v1/app/email-sending/send \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "USER_ID",
    "templateSlug": "appointment_reminder",
    "language": "en",
    "variables": { "appointmentName": "Dentist", "appointmentTime": "14:00" },
    "scheduledAt": "2026-04-12T14:00:00Z"
  }'

# Cancel a scheduled email
curl -X DELETE https://horizon.pm/api/v1/app/email-sending/EMAIL_ID \
  -H "X-API-Key: YOUR_API_KEY"

这些示例使用 Unity SDK(C#)和 REST API。Godot 和 Unreal 在各自的 SDK 中有相同的调用: 参见快速入门

常见问题

常见问题

准备好开始集成了吗?

今天就开始使用 horizOn 构建你的游戏后端,免费套餐开箱即用。