Message

Adobe AIR native extension

Send messages from AIR using email and SMS

The extension is available here: com.distriqt.Message

Documentation

Sending an Email

Sending an email is a simple task of calling the sendMail function, specifying the subject, body and recipients. If you wish you can also using the sendMailWithOptions function to send more complex data, including:

The following example shows the supported HTML content:

if (Message.isMailSupported)
{
	var email:String = "emailaddress@test.com";
	var subject:String = "Sending HTML email from AIR using the distriqt Message ANE";
	
	var body:String = 
		"<div>"+
		"<p>This HTML email was sent using the distriqt <b>Message ANE</b></p>"+
		"A link: <a href='http://airnativeextensions.com'>airnativeextensions.com</a>"+
		"<br/>" +
		"Block: <blockquote>Some quote</blockquote>"+
		"<br/>" +
		"Bold: <b>This text should be bold</b>"+
		"<br/>" +
		"Italic: <i>This text should be italic</i>"+
		"<br/>" +
		"Colour: <font color='#ff0000'>This text should be red</font>"+
		"<div/>" ;
		
	Message.service.sendMailWithOptions( 
		subject, 
		body, 
		email, 
		"",
		"",
		[],
		true
	);
}

Attachments