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());
}
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMimeType}{tr:id=name}{td}h6.getMimeType{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getMimeType{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the Mime type of this attachment.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} 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('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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getName}{tr:id=name}{td}h6.getName{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getName{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the name of this attachment.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} 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());
}
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=isEmbedded}{tr:id=name}{td}h6.isEmbedded{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}isEmbedded{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div: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.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} 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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |