Child pages
  • Attachment

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)
byte[]
Table Cell (td)
#getData()
Returns a byte array with the content of this attachment.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getMimeType()
Returns the Mime type of this attachment.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getName()
Returns the name of this attachment.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#isEmbedded()
Returns true if this attachment is embedded, false otherwise.

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idgetData
classnode
Table Row (tr)
idname
Table Cell (td)
getData
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
byte[]
Span
stylefloat: left; font-weight: bold;
idiets
getData
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a byte array with the content of this attachment.
Table Row (tr)
idret
Table Cell (td)
Returns
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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 Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetMimeType
classnode
Table Row (tr)
idname
Table Cell (td)
getMimeType
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getMimeType
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the Mime type of this attachment.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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 Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetName
classnode
Table Row (tr)
idname
Table Cell (td)
getName
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getName
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the name of this attachment.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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 Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idisEmbedded
classnode
Table Row (tr)
idname
Table Cell (td)
isEmbedded
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
isEmbedded
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
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)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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 Row (tr)
classlastDetailRow
Table Cell (td)