Skip to content
Reference > AmiScript > Methods

writeMsgFile(subject,body,toList,ccList,bccList,attachmentNames,attachmentData)

Definition

Binary writeMsgFile(String subject, String body, List toList, List ccList, List bccList, List attachmentNames, List attachmentData)

Description

Creates a Microsoft Outlook Item (.msg) Binary. Check parseMsgFile for parsing msg files.

Parameter Definition

Name Type Description
subject String Email subject
body String Email body
toList List List of email addresses to send to
ccList List List of email addresses to CC
bccList List List of email addresses to BCC
attachmentNames List List of attachment names. The length of this list must match the attachment data passed.
attachmentData List List of attachment binary data. The length of this list must match the attachment names passed.

Examples

1
2
3
Binary r1 = writeMsgFile("Subject","Body",new List("one@3forge.com"),null,null,null,null); // r1 == 4608 bytes
Binary r2 = writeMsgFile("Subject","Body",new List("one@3forge.com"),new List("two@3forge.com"),new List("three@3forge.com"),null,null); // r2 == 6144 bytes
Binary r3 = writeMsgFile("Subject","Body",new List("one@3forge.com"),null,null,new List("meeting.ics", "info.pdf"),new List(4 bytes, 4 bytes)); // r3 == 6656 bytes