邮件发送

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

免费开始使用

您的SMTP,您的品牌

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

带变量的模板引擎

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

立即或定时发送

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

专为游戏事件构建

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

快速集成

快速集成

C#
// Unity C# - Email Sending
using HorizOn;

var horizon = new HorizonClient("YOUR_API_KEY");

// Send an immediate email to a registered player
await horizon.Email.Send(new SendEmailRequest {
    UserId = userId,
    TemplateSlug = "welcome",
    Language = "en",
    Variables = new Dictionary<string, string> {
        { "username", "PlayerOne" }
    }
});

// Schedule an email for later delivery
await horizon.Email.Send(new SendEmailRequest {
    UserId = userId,
    TemplateSlug = "appointment_reminder",
    Language = "en",
    Variables = new Dictionary<string, string> {
        { "appointmentName", "Dentist" },
        { "appointmentTime", "14:00" }
    },
    ScheduledAt = DateTime.UtcNow.AddDays(1)
});

// Cancel a scheduled email
await horizon.Email.Cancel(emailId);
REST
# REST API - Email Sending

# Send an immediate email
curl -X POST https://eu.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 tomorrow
curl -X POST https://eu.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://eu.horizon.pm/api/v1/app/email-sending/EMAIL_ID \
  -H "X-API-Key: YOUR_API_KEY"
常见问题

常见问题

准备好开始集成了吗?

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