Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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{hidden}
{sub-section:description|text=}*Using GMail*
To connect to GMail the following settings supplied in the properties Array:
{code}
var userName = 'xxx';
var passWord = 'yyy';
var properties = new Array();
properties[0] = 'mail.smtp.host=smtp.gmail.com';
properties[1] = 'mail.smtp.auth=true';
properties[2] = 'mail.smtp.username=' + userName;
properties[3] = 'mail.smtp.password=' + passWord;
properties[4] = 'mail.smtp.port=587';
properties[5] = 'mail.smtp.starttls.enable=true';
{code}{sub-section}\\ 

{table:class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[Attachment]{span}{span:class=sWordList}[MailMessage]{span}{td}{tr}{table}\\ 

{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Server Property Summary{th}{tr}{tbody}{tr}{td}{td}{td}[#mail.development.override.address]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.mime.charset]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.pop3.apop.enable]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.pop3.host]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.auth]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.connectiontimeout]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.host]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.password]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.socketFactory.class]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.socketFactory.fallback]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.socketFactory.port]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.timeout]
{td}{tr}{tbody}{tbody}{tr}{td}{td}{td}[#mail.smtp.username]
{td}{tr}{tbody}{table}\\ 

{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Attachment]{td}{td}[#createBinaryAttachment]\(filename, binarydata, mimeType)
Creates a binary attachment object.{td}{tr}{tbody}{tbody}{tr}{td}[Attachment]{td}{td}[#createTextAttachment]\(filename, textdata, mimeType)
Creates a text based attachment object.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getLastSendMailExceptionMsg]\()
Get the exception that occurred in the last sendMail attempt (null if no exception occurred).{td}{tr}{tbody}{tbody}{tr}{td}[MailMessage]{td}{td}[#getMailMessage]\(binaryblob/string)
Helper method, returns MailMessage object from binary or 7bits string.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getPlainMailAddresses]\(addressesString)
Helper method to only get the plain addresses.{td}{tr}{tbody}{tbody}{tr}{td}[MailMessage]\[]{td}{td}[#receiveMail]\(userName, password, leaveMsgsOnServer, receiveMode, onlyreceiveMsgWithSentDate, overridePreferencePOP3Host/properties array)
Receive mails from pop3 account.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#sendMail]\(to, from, subject, msgText, cc, bcc, attachment/attachments array, overridePreferenceSMTPHost/properties array)
Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Server Property Details{th}{tr}{tbody:id=7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D}{tr:id=name}{td}h6.mail.development.override.address{td}{tr}{tr:id=des}{td}{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_des|text=|trigger=button}{sub-section}{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_des|trigger=none|class=sIndent}Specify an email address to which all email will be send instead of the specified To, Cc and Bcc addresses.
The specified to, Cc and Bcc addresses will be added to the Subject.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_ret|text=|trigger=button}{sub-section}{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_see|text=|trigger=button}{sub-section}{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_see|text=|trigger=button}{sub-section}{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_sam|text=|trigger=button}{sub-section}{sub-section:7B45693775EFEC95-66C7734E-42064E80-837BA937-59D678A10C741F30F6F95B5D_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D}{tr:id=name}{td}h6.mail.mime.charset{td}{tr}{tr:id=des}{td}{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_des|text=|trigger=button}{sub-section}{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_des|trigger=none|class=sIndent}Specify the name of the charset to use for mail encoding (leave emtpy for system default), see http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html forinfo which charset names are usable{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_ret|text=|trigger=button}{sub-section}{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_see|text=|trigger=button}{sub-section}{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_see|text=|trigger=button}{sub-section}{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_sam|text=|trigger=button}{sub-section}{sub-section:95EF0F2DF9DD008D-CBEEC181-463F4235-91F788BD-DE277B456743C4BAD5528E6D_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07}{tr:id=name}{td}h6.mail.pop3.apop.enable{td}{tr}{tr:id=des}{td}{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_des|text=|trigger=button}{sub-section}{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_des|trigger=none|class=sIndent}Whether or not to use APOP for authentication (true/false){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_ret|text=|trigger=button}{sub-section}{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_see|text=|trigger=button}{sub-section}{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_see|text=|trigger=button}{sub-section}{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_sam|text=|trigger=button}{sub-section}{sub-section:AF7C5068CB9A3CE9-A026C21F-4FC34DBE-82E0885A-2A41C2755228C7F254B9EF07_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12}{tr:id=name}{td}h6.mail.pop3.host{td}{tr}{tr:id=des}{td}{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_des|text=|trigger=button}{sub-section}{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_des|trigger=none|class=sIndent}The name of POP3 server to recieve mails from{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_ret|text=|trigger=button}{sub-section}{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_see|text=|trigger=button}{sub-section}{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_see|text=|trigger=button}{sub-section}{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_sam|text=|trigger=button}{sub-section}{sub-section:04ACA5E96F184A89-335F4629-4F504EC7-B07E85E3-57E1BC8D88671107C2E52E12_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0}{tr:id=name}{td}h6.mail.smtp.auth{td}{tr}{tr:id=des}{td}{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_des|text=|trigger=button}{sub-section}{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_des|trigger=none|class=sIndent}Use authentication (true/false){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_ret|text=|trigger=button}{sub-section}{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_see|text=|trigger=button}{sub-section}{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_see|text=|trigger=button}{sub-section}{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_sam|text=|trigger=button}{sub-section}{sub-section:DD454E750E4B17DE-83510D17-4C304B3D-85229FF5-8805BEA3CF268F36A40155D0_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B}{tr:id=name}{td}h6.mail.smtp.connectiontimeout{td}{tr}{tr:id=des}{td}{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_des|text=|trigger=button}{sub-section}{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_des|trigger=none|class=sIndent}Socket connection timeout value in milliseconds. Default is infinite timeout.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_ret|text=|trigger=button}{sub-section}{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_see|text=|trigger=button}{sub-section}{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_see|text=|trigger=button}{sub-section}{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_sam|text=|trigger=button}{sub-section}{sub-section:8EEF57DF9FD9EA49-5C8F26D4-42F34FCE-91D3B6B8-29CCCEF9497D9EDD97EC0B2B_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E}{tr:id=name}{td}h6.mail.smtp.host{td}{tr}{tr:id=des}{td}{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_des|text=|trigger=button}{sub-section}{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_des|trigger=none|class=sIndent}The name of SMTP server to deliver the mails to{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_ret|text=|trigger=button}{sub-section}{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_see|text=|trigger=button}{sub-section}{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_see|text=|trigger=button}{sub-section}{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_sam|text=|trigger=button}{sub-section}{sub-section:C429A111EE0E570C-C5F2AA23-45E0435C-8E59A120-607257881ECA6B0D3459857E_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7}{tr:id=name}{td}h6.mail.smtp.password{td}{tr}{tr:id=des}{td}{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_des|text=|trigger=button}{sub-section}{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_des|trigger=none|class=sIndent}Specify password if using authentication{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_ret|text=|trigger=button}{sub-section}{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_see|text=|trigger=button}{sub-section}{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_see|text=|trigger=button}{sub-section}{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_sam|text=|trigger=button}{sub-section}{sub-section:6A9990D893FC4D67-325DDE9F-45254952-B40CA8BE-2A11A16A342C8F13EBCAF4B7_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1}{tr:id=name}{td}h6.mail.smtp.socketFactory.class{td}{tr}{tr:id=des}{td}{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_des|text=|trigger=button}{sub-section}{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_des|trigger=none|class=sIndent}If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets. Use "javax.net.ssl.SSLSocketFactory" for SSL{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_ret|text=|trigger=button}{sub-section}{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_see|text=|trigger=button}{sub-section}{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_see|text=|trigger=button}{sub-section}{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_sam|text=|trigger=button}{sub-section}{sub-section:55A0A46568E0D716-709F31E1-46D4428E-81F4B25A-65A994E45763CA573230D8D1_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A}{tr:id=name}{td}h6.mail.smtp.socketFactory.fallback{td}{tr}{tr:id=des}{td}{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_des|text=|trigger=button}{sub-section}{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_des|trigger=none|class=sIndent}If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_ret|text=|trigger=button}{sub-section}{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_see|text=|trigger=button}{sub-section}{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_see|text=|trigger=button}{sub-section}{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_sam|text=|trigger=button}{sub-section}{sub-section:7920B7824C20998B-5F83C184-4E2B4711-BCF1858F-B24E90CB786CD273A23FDC0A_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883}{tr:id=name}{td}h6.mail.smtp.socketFactory.port{td}{tr}{tr:id=des}{td}{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_des|text=|trigger=button}{sub-section}{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_des|trigger=none|class=sIndent}Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_ret|text=|trigger=button}{sub-section}{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_see|text=|trigger=button}{sub-section}{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_see|text=|trigger=button}{sub-section}{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_sam|text=|trigger=button}{sub-section}{sub-section:1E001A69D58E633C-A5323C7C-409E488D-804A9CEB-1A63E10065B52C530AD40883_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD}{tr:id=name}{td}h6.mail.smtp.timeout{td}{tr}{tr:id=des}{td}{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_des|text=|trigger=button}{sub-section}{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_des|trigger=none|class=sIndent}Socket I/O timeout value in milliseconds. Default is infinite timeout.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_ret|text=|trigger=button}{sub-section}{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_see|text=|trigger=button}{sub-section}{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_see|text=|trigger=button}{sub-section}{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_sam|text=|trigger=button}{sub-section}{sub-section:121F21B6002F5977-BF84FB08-49884E07-86BB8DBE-441D07FD1869E616CFC013AD_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075}{tr:id=name}{td}h6.mail.smtp.username{td}{tr}{tr:id=des}{td}{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_des|text=|trigger=button}{sub-section}{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_des|trigger=none|class=sIndent}Specify username if using authentication{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=ret}{td}*Returns*\\{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_ret|text=|trigger=button}{sub-section}{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_ret|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_see|text=|trigger=button}{sub-section}{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_see|text=|trigger=button}{sub-section}{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_sam|text=|trigger=button}{sub-section}{sub-section:48E3A9CF08C8CC04-840E34C2-4A974422-83FAAD7E-655CBF176D8AE6B108D44075_sam|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F}{tr:id=name}{td}h6.createBinaryAttachment{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Attachment]{span}{span:id=iets|style=float: left; font-weight: bold;}createBinaryAttachment{span}{span:id=iets|style=float: left;}\(filename, binarydata, mimeType){span}{td}{tr}{tr:id=des}{td}{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_des|text=|trigger=button}{sub-section}{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_des|trigger=none|class=sIndent}Creates a binary attachment object.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_prs|trigger=none}filename
binarydata
\[mimeType\]
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_ret|text=|trigger=button}{sub-section}{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_ret|trigger=none|class=sIndent}[Attachment]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_see|text=|trigger=button}{sub-section}{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_see|text=|trigger=button}{sub-section}{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_sam|text=|trigger=button}{sub-section}{sub-section:6061130107ADBFE1-10F2786D-4C2D4A3C-941B8858-CAFB295EAC5192AD23785C6F_sam|class=sIndent|trigger=none}{code:language=javascript}
var attachment1 = plugins.mail.createBinaryAttachment('logo1.gif',plugins.file.readFile('c:/temp/a_logo.gif'));
var attachment2 = plugins.mail.createBinaryAttachment('logo2.gif',plugins.file.readFile('c:/temp/another_logo.gif'));
var success = plugins.mail.sendMail('[email protected]', 'John Cobb <[email protected]>', 'subject', 'msgText',null,null,new Array(attachment1,attachment2));
if (!success) 
{
	plugins.dialogs.showWarningDialog('Alert','Failed to send mail','OK');
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C}{tr:id=name}{td}h6.createTextAttachment{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Attachment]{span}{span:id=iets|style=float: left; font-weight: bold;}createTextAttachment{span}{span:id=iets|style=float: left;}\(filename, textdata, mimeType){span}{td}{tr}{tr:id=des}{td}{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_des|text=|trigger=button}{sub-section}{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_des|trigger=none|class=sIndent}Creates a text based attachment object.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_prs|trigger=none}filename
textdata
\[mimeType\]
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_ret|text=|trigger=button}{sub-section}{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_ret|trigger=none|class=sIndent}[Attachment]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_see|text=|trigger=button}{sub-section}{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_see|text=|trigger=button}{sub-section}{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_sam|text=|trigger=button}{sub-section}{sub-section:8EE4FB97945AA3B8-83AAD30D-4D614A24-8CFF8907-DE1B306C7BEAF34C8A458A4C_sam|class=sIndent|trigger=none}{code:language=javascript}
var attachment = plugins.mail.createTextAttachment('readme.html','<html>bla bla bla', 'text/html');
var success = plugins.mail.sendMail('[email protected]', 'John Cobb <[email protected]>', 'subject', 'msgText',null,null,attachment);
if (!success) 
{
	plugins.dialogs.showWarningDialog('Alert','Failed to send mail','OK');
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D}{tr:id=name}{td}h6.getLastSendMailExceptionMsg{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getLastSendMailExceptionMsg{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_des|text=|trigger=button}{sub-section}{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_des|trigger=none|class=sIndent}Get the exception that occurred in the last sendMail attempt (null if no exception occurred).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_ret|text=|trigger=button}{sub-section}{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_see|text=|trigger=button}{sub-section}{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_see|text=|trigger=button}{sub-section}{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_sam|text=|trigger=button}{sub-section}{sub-section:04FD83E2D81898B6-4086D880-4599406A-8C7C9E30-46A060EDE05610BA41FD858D_sam|class=sIndent|trigger=none}{code:language=javascript}
var success = plugins.mail.sendMail('[email protected],[email protected]', 'John Cobb <[email protected]>', 'subject', 'my message',null,'[email protected]');
if (!success) 
{
	plugins.dialogs.showWarningDialog('Alert',plugins.mail.getLastSendMailExceptionMsg(),'OK');
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B}{tr:id=name}{td}h6.getMailMessage{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MailMessage]{span}{span:id=iets|style=float: left; font-weight: bold;}getMailMessage{span}{span:id=iets|style=float: left;}\(binaryblob/string){span}{td}{tr}{tr:id=des}{td}{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_des|text=|trigger=button}{sub-section}{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_des|trigger=none|class=sIndent}Helper method, returns MailMessage object from binary or 7bits string.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_prs|trigger=none}binaryblob/string
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_ret|text=|trigger=button}{sub-section}{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_ret|trigger=none|class=sIndent}[MailMessage]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_see|text=|trigger=button}{sub-section}{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_see|text=|trigger=button}{sub-section}{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_sam|text=|trigger=button}{sub-section}{sub-section:ADCB5B6A44C7A24C-35E41D36-4C9347E3-822DBB35-C7A8BDE368EC1C0FE078CE6B_sam|class=sIndent|trigger=none}{code:language=javascript}
var msg = plugins.mail.getMailMessage(myColumn);
if (msg != null) //if is null error occurred!
{
	application.output(msg.getFromAddresses())
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D}{tr:id=name}{td}h6.getPlainMailAddresses{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getPlainMailAddresses{span}{span:id=iets|style=float: left;}\(addressesString){span}{td}{tr}{tr:id=des}{td}{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_des|text=|trigger=button}{sub-section}{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_des|trigger=none|class=sIndent}Helper method to only get the plain addresses.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_prs|trigger=none}addressesString
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_ret|text=|trigger=button}{sub-section}{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_ret|trigger=none|class=sIndent}[String]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_see|text=|trigger=button}{sub-section}{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_see|text=|trigger=button}{sub-section}{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_sam|text=|trigger=button}{sub-section}{sub-section:2204870939C0F074-B53DAC2B-4E4642F8-876185AC-030E73E12B20EAFF1077665D_sam|class=sIndent|trigger=none}{code:language=javascript}
var plainArray = plugins.mail.getPlainMailAddresses('John Cobb <[email protected]>;Pete Cobb<[email protected]>');
application.output(plainArray[0]) //will return '[email protected]'
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A}{tr:id=name}{td}h6.receiveMail{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[MailMessage]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}receiveMail{span}{span:id=iets|style=float: left;}\(userName, password, leaveMsgsOnServer, receiveMode, onlyreceiveMsgWithSentDate, overridePreferencePOP3Host/properties array){span}{td}{tr}{tr:id=des}{td}{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_des|text=|trigger=button}{sub-section}{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_des|trigger=none|class=sIndent}Receive mails from pop3 account.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_prs|trigger=none}userName
password
leaveMsgsOnServer
\[receiveMode\]
\[onlyreceiveMsgWithSentDate\]
\[overridePreferencePOP3Host/properties array\]
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_ret|text=|trigger=button}{sub-section}{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_ret|trigger=none|class=sIndent}[MailMessage]\[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_see|text=|trigger=button}{sub-section}{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_see|text=|trigger=button}{sub-section}{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_sam|text=|trigger=button}{sub-section}{sub-section:FEB0A5FA9B868563-C4A43D35-44B8488E-ACB6B2C4-C96000026571DFCFD286495A_sam|class=sIndent|trigger=none}{code:language=javascript}
var msgs = plugins.mail.receiveMail('me', 'test', true);
if (msgs != null) //if is null error occurred!
{
	for (var i = 0 ; i < msgs.length ; i++)
	{
		var msg = msgs[i]
		application.output(msg.getFromAddresses())
		application.output(msg.getRecipientAddresses())
		application.output(msg.getReplyAddresses())
		application.output(msg.getReceivedDate())
		application.output(msg.getSentDate())
		application.output(msg.getHeaders())
		application.output(msg.getSubject())
		application.output(msg.getHtmlMsg())
		application.output(msg.getPlainMsg())
		var attachments = msg.getAttachments()
		if (attachments != null) 
		{
			for (var j = 0 ; j < attachments.length ; j++)
			{
				var attachment = attachments[j]
				application.output(attachment.getName())
				var attachmentDataByteArray = attachment.getData()
				//write attachmentDataByteArray to a file...
			}
		}
	}
}

//it is also possible to first receive the headers and later receive a full message with particular 'sentdate'
//var receiveMode = 1;//0=FULL,1=HEADERS_ONLY,2=NO_ATTACHMENTS
//var msgs = plugins.mail.receiveMail('me', 'test', true ,receiveMode);

//when first did receive the headers(=all_field+subject,no body and no attachemnt), get a msg with a specific sentdate
//var msgs = plugins.mail.receiveMail('me', 'test', true , 1 , theSentDateObjectFormPreviousHeaderLoading);

//it is possbile to set all kind of pop3 properties
//var properties = new Array()
//properties[0] = 'mail.pop3.host=myserver.com'
//properties specification can be found at:http://java.sun.com/products/javamail/javadocs/com/sun/mail/pop3/package-summary.html
//var msgs = plugins.mail.receiveMail('me', 'test', true , 0 , null, properties);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635}{tr:id=name}{td}h6.sendMail{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}sendMail{span}{span:id=iets|style=float: left;}\(to, from, subject, msgText, cc, bcc, attachment/attachments array, overridePreferenceSMTPHost/properties array){span}{td}{tr}{tr:id=des}{td}{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_des|text=|trigger=button}{sub-section}{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_des|trigger=none|class=sIndent}Send a mail, if you make the msgText start with <html> the message will be sent in html (and you can use all html formatting).{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_prs|trigger=none}to
from
subject
msgText
\[cc\]
\[bcc\]
\[attachment/attachments array\]
\[overridePreferenceSMTPHost/properties array\]
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_ret|text=|trigger=button}{sub-section}{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_see|text=|trigger=button}{sub-section}{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_see|text=|trigger=button}{sub-section}{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_sam|text=|trigger=button}{sub-section}{sub-section:A8725D222D85EB07-D9B76CA8-47CA4771-A3B1A9DA-03691CA2E55E78701CC23635_sam|class=sIndent|trigger=none}{code:language=javascript}
var attachment1 = plugins.mail.createBinaryAttachment('embedded',plugins.file.readFile('c:/temp/a_logo.gif'));
var msgText = 'plain msg<html>styled html msg<img src="%%embedded%%"></html>';
var success = plugins.mail.sendMail('[email protected],[email protected]', 'John Cobb <[email protected]>', 'subject', msgText,null,'[email protected]',[attachment1]);
if (!success) 
{
	plugins.dialogs.showWarningDialog('Alert','Failed to send mail','OK');
}

//it is possbile to set all kind of smtp properties
//var properties = new Array()
//properties[0] = 'mail.smtp.host=myserver.com'
//properties specification can be found at:http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp/package-summary.html
//var msgs = plugins.mail.sendMail('[email protected],[email protected]', 'John Cobb <[email protected]>', 'subject', msgText,null,'[email protected]',null, properties);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}