Child pages
  • MailMessage

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Hidden
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE


HTML Table
classservoy sSummery
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summery
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Attachment[]
Table Cell (td)
#getAttachments()
Returns an array of Attachment instances corresponding to the attachments of this message.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getCCAddresses()
Returns a String with all addresses present in the CC field of this message.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getFromAddresses()
Returns a String with all addresses present in the From field of this message.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getHeaders()
Returns a String with all headers of this message.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getHtmlMsg()
Returns a String with the HTML content of this message.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getPlainMsg()
Returns a String with the plain content of this message.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Date
Table Cell (td)
#getReceivedDate()
Returns a Date instace corresponding to the moment when the message was received.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getRecipientAddresses()
Returns a String with all addresses in the To field of this message.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getReplyAddresses()
Returns a String with all addresses in the Reply-To field of this message.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Date
Table Cell (td)
#getSentDate()
Returns a Date instance corresponding to the moment when this message was sent.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getSubject()
Returns a String with the subject of this message.

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idgetAttachments
classnode
Table Row (tr)
idname
Table Cell (td)
getAttachments
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Attachment[]
Span
stylefloat: left; font-weight: bold;
idiets
getAttachments
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns an array of Attachment instances corresponding to the attachments of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
Attachment[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetCCAddresses
classnode
Table Row (tr)
idname
Table Cell (td)
getCCAddresses
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getCCAddresses
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a String with all addresses present in the CC field of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFromAddresses
classnode
Table Row (tr)
idname
Table Cell (td)
getFromAddresses
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getFromAddresses
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a String with all addresses present in the From field of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetHeaders
classnode
Table Row (tr)
idname
Table Cell (td)
getHeaders
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getHeaders
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a String with all headers of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetHtmlMsg
classnode
Table Row (tr)
idname
Table Cell (td)
getHtmlMsg
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getHtmlMsg
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a String with the HTML content of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetPlainMsg
classnode
Table Row (tr)
idname
Table Cell (td)
getPlainMsg
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getPlainMsg
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a String with the plain content of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetReceivedDate
classnode
Table Row (tr)
idname
Table Cell (td)
getReceivedDate
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Date
Span
stylefloat: left; font-weight: bold;
idiets
getReceivedDate
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a Date instace corresponding to the moment when the message was received.
Table Row (tr)
idret
Table Cell (td)
Returns
Date
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRecipientAddresses
classnode
Table Row (tr)
idname
Table Cell (td)
getRecipientAddresses
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getRecipientAddresses
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a String with all addresses in the To field of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetReplyAddresses
classnode
Table Row (tr)
idname
Table Cell (td)
getReplyAddresses
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getReplyAddresses
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a String with all addresses in the Reply-To field of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetSentDate
classnode
Table Row (tr)
idname
Table Cell (td)
getSentDate
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Date
Span
stylefloat: left; font-weight: bold;
idiets
getSentDate
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a Date instance corresponding to the moment when this message was sent.
Table Row (tr)
idret
Table Cell (td)
Returns
Date
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetSubject
classnode
Table Row (tr)
idname
Table Cell (td)
getSubject
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getSubject
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a String with the subject of this message.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var msgs = plugins.mail.receiveMail(username, password, true, 0, null, properties);
if (msgs != null)
{
	for (var i=0; i < msgs.length; i++)
	{
		var msg = msgs[i];
		var str = '';
		str += 'From: ' + msg.getFromAddresses() + '\n';
		str += 'To: ' + msg.getRecipientAddresses() + '\n';
		str += 'CC: ' + msg.getCCAddresses() + '\n';
		str += 'Reply to: ' + msg.getReplyAddresses() + '\n';
		str += 'Received on: ' + msg.getReceivedDate() + '\n';
		str += 'Sent on: ' + msg.getSentDate() + '\n\n';
		str += 'Subject: ' + msg.getSubject() + '\n\n';
		str += 'Plain message: ' + msg.getPlainMsg() + '\n\n';
		str += 'HTML message: ' + msg.getHtmlMsg() + '\n\n';
		str += 'Headers: ' + msg.getHeaders() + '\n\n';
		var attachments = msg.getAttachments();
		if (attachments != null) {
			str += 'Number of attachments: ' + attachments.length + '\n\n';
			for (var j=0; j < attachments.length; j++)
			{
				var attachment = attachments[j];
				str += 'Attachment ' + j + '\n';
				str += '	Name: ' + attachment.getName() + '\n';
				str += '	Size: ' + attachment.getData().length + '\n\n';
			}
		}
		plugins.file.writeTXTFile('msg' + i + '.txt', str);
		application.output('Message ' + i + ' retrieved.');
	}
}
else
{
	application.output("Failed to retrieve messages.");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)