Child pages
  • Attachment
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Unknown macro: {sub-section}


Unknown macro: {table}

{column:width=80px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

byte[]

Unknown macro: {td}

getData()
Returns a byte array with the content of this attachment.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

getMimeType()
Returns the Mime type of this attachment.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

getName()
Returns the name of this attachment.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

isEmbedded()
Returns true if this attachment is embedded, false otherwise.


Unknown macro: {table}

{column:width=100%}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getData
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

byte[]

Unknown macro: {span}

getData

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Returns a byte array with the content of this attachment.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

byte[]

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var logo = plugins.mail.createBinaryAttachment('logo.jpg', plugins.file.readFile('d:/logo.jpg'));
var invoice = plugins.mail.createTextAttachment('invoice.txt', plugins.file.readTXTFile('d:/invoice.txt'));
var attachments = new Array(logo, invoice);
var success = plugins.mail.sendMail(toAddress, fromAddress, 'subject line', 'message text', null, null, attachments, properties);
if (!success)
{
	plugins.dialogs.showWarningDialog('Alert', 'Failed to send mail', 'OK');
}
else
{
	plugins.dialogs.showInfoDialog('Success', 'Mail sent', 'OK');
	application.output('logo attachment name: ' + logo.getName());
	application.output('logo attachment mime type: ' + logo.getMimeType());
	application.output('logo attachment size: ' + logo.getData().length);
	application.output('logo attachment embedded state: ' + logo.isEmbedded());
	application.output('invoice attachment name: ' + invoice.getName());
	application.output('invoice attachment mime type: ' + invoice.getMimeType());
	application.output('invoice attachment size: ' + invoice.getData().length);
	application.output('invoice attachment embedded state: ' + invoice.isEmbedded());
}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getMimeType
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

getMimeType

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Returns the Mime type of this attachment.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

String

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var logo = plugins.mail.createBinaryAttachment('logo.jpg', plugins.file.readFile('d:/logo.jpg'));
var invoice = plugins.mail.createTextAttachment('invoice.txt', plugins.file.readTXTFile('d:/invoice.txt'));
var attachments = new Array(logo, invoice);
var success = plugins.mail.sendMail(toAddress, fromAddress, 'subject line', 'message text', null, null, attachments, properties);
if (!success)
{
	plugins.dialogs.showWarningDialog('Alert', 'Failed to send mail', 'OK');
}
else
{
	plugins.dialogs.showInfoDialog('Success', 'Mail sent', 'OK');
	application.output('logo attachment name: ' + logo.getName());
	application.output('logo attachment mime type: ' + logo.getMimeType());
	application.output('logo attachment size: ' + logo.getData().length);
	application.output('logo attachment embedded state: ' + logo.isEmbedded());
	application.output('invoice attachment name: ' + invoice.getName());
	application.output('invoice attachment mime type: ' + invoice.getMimeType());
	application.output('invoice attachment size: ' + invoice.getData().length);
	application.output('invoice attachment embedded state: ' + invoice.isEmbedded());
}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getName
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

String

Unknown macro: {span}

getName

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Returns the name of this attachment.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

String

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var logo = plugins.mail.createBinaryAttachment('logo.jpg', plugins.file.readFile('d:/logo.jpg'));
var invoice = plugins.mail.createTextAttachment('invoice.txt', plugins.file.readTXTFile('d:/invoice.txt'));
var attachments = new Array(logo, invoice);
var success = plugins.mail.sendMail(toAddress, fromAddress, 'subject line', 'message text', null, null, attachments, properties);
if (!success)
{
	plugins.dialogs.showWarningDialog('Alert', 'Failed to send mail', 'OK');
}
else
{
	plugins.dialogs.showInfoDialog('Success', 'Mail sent', 'OK');
	application.output('logo attachment name: ' + logo.getName());
	application.output('logo attachment mime type: ' + logo.getMimeType());
	application.output('logo attachment size: ' + logo.getData().length);
	application.output('logo attachment embedded state: ' + logo.isEmbedded());
	application.output('invoice attachment name: ' + invoice.getName());
	application.output('invoice attachment mime type: ' + invoice.getMimeType());
	application.output('invoice attachment size: ' + invoice.getData().length);
	application.output('invoice attachment embedded state: ' + invoice.isEmbedded());
}
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
isEmbedded
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Boolean

Unknown macro: {span}

isEmbedded

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {sub-section}
Unknown macro: {sub-section}

Returns true if this attachment is embedded, false otherwise. Attachments become embedded if they are references through tags from the body text of the message.

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {sub-section}
Unknown macro: {div}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {sub-section}
Unknown macro: {sub-section}

Boolean

Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

Also see

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {builder-show}
Unknown macro: {tr}
Unknown macro: {td}

External links

Unknown macro: {sub-section}
Unknown macro: {sub-section}
Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {sub-section}
Unknown macro: {sub-section}
var logo = plugins.mail.createBinaryAttachment('logo.jpg', plugins.file.readFile('d:/logo.jpg'));
var invoice = plugins.mail.createTextAttachment('invoice.txt', plugins.file.readTXTFile('d:/invoice.txt'));
var attachments = new Array(logo, invoice);
var success = plugins.mail.sendMail(toAddress, fromAddress, 'subject line', 'message text', null, null, attachments, properties);
if (!success)
{
	plugins.dialogs.showWarningDialog('Alert', 'Failed to send mail', 'OK');
}
else
{
	plugins.dialogs.showInfoDialog('Success', 'Mail sent', 'OK');
	application.output('logo attachment name: ' + logo.getName());
	application.output('logo attachment mime type: ' + logo.getMimeType());
	application.output('logo attachment size: ' + logo.getData().length);
	application.output('logo attachment embedded state: ' + logo.isEmbedded());
	application.output('invoice attachment name: ' + invoice.getName());
	application.output('invoice attachment mime type: ' + invoice.getMimeType());
	application.output('invoice attachment size: ' + invoice.getData().length);
	application.output('invoice attachment embedded state: ' + invoice.isEmbedded());
}
Unknown macro: {tr}
Unknown macro: {td}
  • No labels