UTMail
1.1
Email Composition and Sending Plugin
|
UTMail is Unity extension allowing developers composing and sending emails directly from C# code. It provides common cross-platform API and works on multiple platforms: macOS, Windows, Windows Store (Windows Phone 8.1, Windows 8.1/10, Universal 8.1, Universal 10), Android, iOS.
It's an essential tool for integrating "Contact Support" functionality, and is also a very effective way of getting feedback for beta versions and internal test sessions. It may also be used for automatic or half-automatic reporting on crashes and other events.
Features:
It's recommended that you take a look at the provided sample scene Assets/UniversalTools/UTMail/Sample/UTMailSample.unity
and script UT.MailSample.UTMailSample to get acquainted with UTMail functionality and API.
Please configure section "SMTP Settings for Sample Sending" in UTMail Sample
GameObject Inspector to be able to send emails directly (without composing).
You can find the complete documentation here: https://universal-tools.github.io/UTMail/index.html.
UT.MailMessage object defines an email content to be sent or composed. You can add a number of "To", "Cc" and "Bcc" recipients, set the message subject and body and define whether the body should be considered as HTML. You can also add any number of attachments. All the fields are optional, f.e it is possible to compose a completely empty UT.MailMessage.
Please note that UT.MailMessage is an IDisposable
object and should be either disposed or wrapped with using
block. For more details on using IDisposable
objects in C#, see https://msdn.microsoft.com/en-us/library/system.idisposable(v=vs.110).aspx.
Example:
Note: HTML bodies are not supported in Windows and Windows Store builds.
See also API Reference for class UT.MailMessage.
Composing shows UT.MailMessage in a system email client, so end-user can modify and send the message from their own email address.
Example:
Note: macOS email composing API doesn't support specifying "Cc" & "Bcc" recipients, they will be added as "To" when composing on macOS instead.
See also API Reference for UT.Mail.Compose.
SMTP protocol is used to send UT.MailMessage directly. It requires at least one recipient specified as "To", "Cc" or "Bcc".
Example:
Note that in order to send emails directly from a Gmail account, you'll have to enable "Allow less secure apps" toggle in your gmail account security settings: https://myaccount.google.com/security.
See also API Reference for each of 4 overloads of UT.Mail.Send.
If you got any questions please feel free to contact us: utmai. l@un ivers al-t ools. com
If you liked using UTMail, please rate it, but any criticism is also welcome: please help us make the asset better.
Thank you for using UTMail!
Your Universal Tools team.