Official Veil Mail plugin for Unreal Engine. Send transactional and marketing emails with automatic PII protection directly from your Unreal Engine project — from both C++ and Blueprints.
Veil Mail is the only email API with a first-class Unreal Engine plugin. Resend, SendGrid, Mailgun, and Postmark offer no official Unreal support — integrating them means hand-rolling HTTP calls in C++ and exposing them to Blueprint yourself. This plugin gives you a fully
BlueprintCallableinterface with typed responses, a built-in test email window in the editor, and project settings integration for API key management.Common use cases in games: email verification, password reset, receipts and invoices, player re-engagement, live-ops announcements, tournament and clan notifications, and transactional flows from dedicated servers or standalone builds.
Other Veil Mail SDKs: Unity · TouchDesigner · Node.js · Python · Go · 11 more
The VeilMail Unreal Engine SDK provides a fully Blueprint-compatible interface to the Veil Mail API. It includes:
- Runtime module (
VeilMail): HTTP client, email sending, domain management, templates, campaigns, audiences, webhooks, and analytics. - Editor module (
VeilMailEditor): A built-in test email window accessible from the Tools menu, and project settings integration for API key configuration.
All public methods are BlueprintCallable, making the SDK usable from both C++ and Blueprints without any additional setup.
- Unreal Engine 5.1 or later
- Platforms: Win64, Mac, Linux
cd YourProject/Plugins
git clone https://github.com/resonia/veil-mail-unreal.git VeilMailOr copy the packages/sdk-unreal directory from the Veil Mail monorepo into your project:
YourProject/
Plugins/
VeilMail/
VeilMail.uplugin
Source/
VeilMail/
VeilMailEditor/
After adding the plugin, regenerate your project files and rebuild.
Open Edit > Project Settings > Plugins > VeilMail and enter:
| Setting | Description |
|---|---|
| API Key | Your Veil Mail API key (veil_live_xxx or veil_test_xxx) |
| Base URL | API endpoint (default: https://api.veilmail.xyz) |
| Timeout (seconds) | HTTP request timeout (default: 30, range: 5-120) |
| Strip API Key in Shipping Builds | When enabled, the API key is not included in packaged shipping builds (default: true) |
If not automatically enabled, go to Edit > Plugins, search for "VeilMail", and enable it. Restart the editor.
Use Create VeilMail Client From Settings to create a client that reads from your project settings:
- Right-click in your Blueprint graph
- Search for "Create VeilMail Client From Settings"
- Store the return value in a variable
Alternatively, use Create VeilMail Client to pass an API key and base URL directly.
- Drag from your VeilMail Client variable
- Search for Send Email
- Fill in the From, To, Subject, and Html pins
- Connect a Custom Event to the OnComplete delegate
- The delegate provides
bSuccess(bool) andResponse(FVeilMailResponse)
The FVeilMailResponse struct contains:
| Field | Type | Description |
|---|---|---|
bSuccess |
bool | Whether the request succeeded (HTTP 2xx) |
StatusCode |
int32 | HTTP status code |
Body |
FString | Raw response body |
ErrorMessage |
FString | Error message (on failure) |
ErrorCode |
FString | Machine-readable error code (on failure) |
Emails:
SendEmail- Send a transactional emailGetEmail- Retrieve a sent email by IDListEmails- List all sent emails
Templates:
ListTemplates- List all email templatesGetTemplate- Retrieve a template by ID
Domains:
ListDomains- List verified sending domains
Audiences:
ListAudiences- List contact audiences
Campaigns:
ListCampaigns- List email campaignsSendCampaign- Trigger a campaign send
Webhooks:
ListWebhooks- List configured webhooks
Analytics:
GetAnalyticsOverview- Get email analytics overview
Advanced:
RawRequest- Make a custom API request with any HTTP method, path, and JSON body
In your module's .Build.cs file:
PublicDependencyModuleNames.Add("VeilMail");#include "VeilMailClient.h"
void AMyActor::SendWelcomeEmail()
{
UVeilMailClient* Client = UVeilMailClient::CreateFromSettings();
Client->AddToRoot(); // prevent garbage collection during async request
FOnVeilMailResponse Delegate;
Delegate.BindLambda([Client](bool bSuccess, const FVeilMailResponse& Response)
{
if (bSuccess)
{
UE_LOG(LogTemp, Log, TEXT("Email sent! Status: %d"), Response.StatusCode);
}
else
{
UE_LOG(LogTemp, Error, TEXT("Failed to send email: %s"), *Response.ErrorMessage);
}
Client->RemoveFromRoot();
});
Client->SendEmail(
TEXT("noreply@yourdomain.com"),
TEXT("player@example.com"),
TEXT("Welcome!"),
TEXT("<h1>Welcome to our game!</h1>"),
Delegate
);
}UVeilMailClient* Client = UVeilMailClient::CreateFromSettings();
FOnVeilMailResponse Delegate;
Delegate.BindLambda([](bool bSuccess, const FVeilMailResponse& Response)
{
// Handle response
});
Client->RawRequest(
EVeilMailHttpMethod::POST,
TEXT("/emails/batch"),
TEXT("{\"emails\": [...]}"),
Delegate
);#include "VeilMailWebhook.h"
bool bValid = UVeilMailWebhook::VerifySignature(
PayloadString,
SignatureHeader,
WebhookSecret
);Access from Tools > VeilMail: Send Test Email in the editor menu bar. This opens a window where you can send a test email using your configured API key without writing any code.
See Docs/SECURITY.md for detailed security guidance.
Key points:
- Never ship API keys in game client builds. Use the
bStripKeyInShippingsetting (enabled by default). - For shipped game clients, route email requests through your own backend server.
- Editor and dedicated server usage is safe since players do not have access to those binaries.
MIT License. See LICENSE for details.