The Email component allows us to send and receive emails without user interaction.
Example - Example
function OnStart()
{
email = app.CreateEmail( "mymail@gmail.com", "MyPass" );
email.SetSMTP( "smtp.gmail.com", 465 );
email.SetOnStatus( email_OnStatus );
app.ShowProgress( "Sending..." );
email.Send( "My Subjewct", "My Content", "mymail@yahoo.com", "myothermail@gmail.com" );
}
function email_OnStatus( status )
{
app.HideProgress();
app.ShowPopup( status );
}
Methods
The following methods are available on the Email object:
string
number: integer
number: integer: 993 or
995
number: integer: 465 or
578 or
587
string: path to file or folder ( “/absolute/...” or “relative/...” )
string: “email”
string: “password”
string: “email address”
object: {
from,
to,
cc,
subject,
body }
eml.GetType
Returns the control class name.
eml.Receive
Start receiving emails from a given folder.
eml.Send
Send an email to someone.
eml.SetIMAP
Set IMAP or POP3 settings for receiving messages.
eml.SetOnMessage
Define a callback function which is called when a message is received.
eml.SetOnStatus
Define a callback function which is called when a status changed.
eml.SetSMTP
Set SMTP settings for sending messages.