Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns a byte array with the content of this attachment. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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());
} |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getMimeType |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns the Mime type of this attachment. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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(' |
|
|
|
| invoicelogo attachment name: ' + |
|
|
|
| invoicelogo.getName());
application.output(' |
|
|
|
| invoicelogo attachment mime type: ' + |
|
|
|
| invoicelogo.getMimeType());
application.output(' |
|
|
|
| invoicelogo attachment size: ' + |
|
|
|
| invoicelogo.getData().length);
application.output(' |
|
|
|
| invoicelogo attachment embedded state: ' + |
|
|
|
| invoice}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D}{tr:id=name}{td}h6.getMimeType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getMimeType{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_des|text=|trigger=button}{sub-section}{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_des|trigger=none|class=sIndent}Returns the Mime type of this attachment.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_ret|text=|trigger=button}{sub-section}{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_see|text=|trigger=button}{sub-section}{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_see|text=|trigger=button}{sub-section}{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_sam|text=|trigger=button}{sub-section}{sub-section:A9C963CC-E0FA-4DA8-8FFA-2CAC8F39A51D_sam|class=sIndent|trigger=none}{code:language=javascript}
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());
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=353903D5-D867-4CCF-A084-ACF354F3F348}{tr:id=name}{td}h6.getName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_des|text=|trigger=button}{sub-section}{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_des|trigger=none|class=sIndent}Returns the name of this attachment.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_ret|text=|trigger=button}{sub-section}{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_see|text=|trigger=button}{sub-section}{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_see|text=|trigger=button}{sub-section}{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_sam|text=|trigger=button}{sub-section}{sub-section:353903D5-D867-4CCF-A084-ACF354F3F348_sam|class=sIndent|trigger=none}{code:language=javascript}
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());
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1936FACB-C985-4D42-BE0C-6AB687097D86}{tr:id=name}{td}h6.isEmbedded{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isEmbedded{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_des|text=|trigger=button}{sub-section}{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_des|trigger=none|class=sIndent}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.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_ret|text=|trigger=button}{sub-section}{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_see|text=|trigger=button}{sub-section}{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_see|text=|trigger=button}{sub-section}{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_sam|text=|trigger=button}{sub-section}{sub-section:1936FACB-C985-4D42-BE0C-6AB687097D86_sam|class=sIndent|trigger=none}{code:language=javascript}
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());
} |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns the name of this attachment. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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());
} |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
isEmbedded |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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());
} |
|
|
|
|
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |