UTMail  1.1
Email Composition and Sending Plugin
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
UT.Mail Class Reference

Provides access to all UTMail features. More...

Public Member Functions

delegate void ResultHandler (MailMessage mailMessage, bool success, string errorMessage)
 

Static Public Member Functions

static void Compose (MailMessage message, string annotation)
 Displays a default system email client application. Allows users to modify a preconfigured (by you) message and send it from their own email address. More...
 
static void Send (MailMessage message, string host, string senderEmail, string password, bool enableSsl, ResultHandler resultHandler=null)
 Sends the specified message with SMTP. More...
 
static void Send (MailMessage message, string host, string senderEmail, string account, string password, bool enableSsl, ResultHandler resultHandler=null)
 Sends the specified message with SMTP. More...
 
static void Send (MailMessage message, string host, int port, string senderEmail, string password, bool enableSsl, ResultHandler resultHandler=null)
 Sends the specified message with SMTP. More...
 
static void Send (MailMessage message, string host, int port, string senderEmail, string account, string password, bool enableSsl, ResultHandler resultHandler=null)
 Sends the specified message with SMTP. More...
 
static int DefaultPort (bool enableSsl)
 Returns a default port depending on enableSsl setting. More...
 

Public Attributes

const string Version = "1.1"
 The asset version. More...
 

Detailed Description

Provides access to all UTMail features.

Member Function Documentation

◆ Compose()

static void UT.Mail.Compose ( MailMessage  message,
string  annotation 
)
static

Displays a default system email client application. Allows users to modify a preconfigured (by you) message and send it from their own email address.

Parameters
messagePreconfigured UT.MailMessage (may include To, CC, Bcc, Body, Text, Attachments, ...) to be displayed in an email client app.
annotationIs used only on Android as a title of an email application choosing popup.

◆ DefaultPort()

static int UT.Mail.DefaultPort ( bool  enableSsl)
static

Returns a default port depending on enableSsl setting.

Returns
The port number.
Parameters
enableSslWhether to use SSL/TLS to establish a secure SMTP connection.

◆ Send() [1/4]

static void UT.Mail.Send ( MailMessage  message,
string  host,
string  senderEmail,
string  password,
bool  enableSsl,
ResultHandler  resultHandler = null 
)
static

Sends the specified message with SMTP.

Parameters
messageUT.MailMessage to send.
hostSMTP server address, f.e. smtp.gmail.com.
senderEmailSender's full email address, f.e. myadd.nosp@m.ress.nosp@m.@gmai.nosp@m.l.co.nosp@m.m.
passwordEmail account password.
enableSslWhether to use SSL/TLS to establish a secure SMTP connection.
resultHandler(Optional) Delegate to be called in the main Unity thread after the sending operation is complete (successfully or not).

UTMail will try to detect the SMTP port automatically based on enableSsl argument (587 for secure connection, 25 otherwise). Full email address will be used as authentication account name.

◆ Send() [2/4]

static void UT.Mail.Send ( MailMessage  message,
string  host,
string  senderEmail,
string  account,
string  password,
bool  enableSsl,
ResultHandler  resultHandler = null 
)
static

Sends the specified message with SMTP.

Parameters
messageUT.MailMessage to send.
hostSMTP server address, f.e. smtp.gmail.com.
senderEmailSender's full email address, f.e. myadd.nosp@m.ress.nosp@m.@gmai.nosp@m.l.co.nosp@m.m.
accountSMTP authentication account name.
passwordEmail account password.
enableSslWhether to use SSL/TLS to establish a secure SMTP connection.
resultHandler(Optional) Delegate to be called in the main Unity thread after the sending operation is complete (successfully or not).

UTMail will try to detect the SMTP port automatically based on enableSsl argument (587 for secure connection, 25 otherwise).

◆ Send() [3/4]

static void UT.Mail.Send ( MailMessage  message,
string  host,
int  port,
string  senderEmail,
string  password,
bool  enableSsl,
ResultHandler  resultHandler = null 
)
static

Sends the specified message with SMTP.

Parameters
messageUT.MailMessage to send.
hostSMTP server address, f.e. smtp.gmail.com.
portSMTP server port (usually 587 or 465 for secure connection, 25 otherwise).
senderEmailSender's full email address, f.e. myadd.nosp@m.ress.nosp@m.@gmai.nosp@m.l.co.nosp@m.m.
passwordEmail account password.
enableSslWhether to use SSL/TLS to establish a secure SMTP connection.
resultHandler(Optional) Delegate to be called in the main Unity thread after the sending operation is complete (successfully or not).

Full email address will be used as authentication account name.

◆ Send() [4/4]

static void UT.Mail.Send ( MailMessage  message,
string  host,
int  port,
string  senderEmail,
string  account,
string  password,
bool  enableSsl,
ResultHandler  resultHandler = null 
)
static

Sends the specified message with SMTP.

Parameters
messageUT.MailMessage to send.
hostSMTP server address, f.e. smtp.gmail.com.
portSMTP server port (usually 587 or 465 for secure connection, 25 otherwise).
senderEmailSender's full email address, f.e. myadd.nosp@m.ress.nosp@m.@gmai.nosp@m.l.co.nosp@m.m.
accountSMTP authentication account name.
passwordEmail account password.
enableSslWhether to use SSL/TLS to establish a secure SMTP connection.
resultHandler(Optional) Delegate to be called in the main Unity thread after the sending operation is complete (successfully or not).

Member Data Documentation

◆ Version

const string UT.Mail.Version = "1.1"

The asset version.


The documentation for this class was generated from the following file: