Sidebar

Can I email an attachment in a channel?

0 votes
418 views
asked Apr 24, 2014 by brandon-w-8204 (33,270 points)

1 Answer

+1 vote

You can attach the source or message as an attachment using the qie.sendEmail command.

 

Here is an example code on how to send the source as an attachment:

var attachmentMap = qie.newEmailAttachmentMap();
qie.addEmailAttachment(attachmentMap, 'file.name', source.getBytes());
qie.sendEmail('email@host.com', 'test attachment', 'here is the attachment', attachmentMap);
 
Sample sending the current message:
 
var attachmentMap = qie.newEmailAttachmentMap();
qie.addEmailAttachment(attachmentMap, 'file.name', message.getBytes());
qie.sendEmail('email@host.com', 'test attachment', 'here is the attachment', attachmentMap);

 

answered Apr 24, 2014 by brandon-w-8204 (33,270 points)
edited Apr 24, 2014 by mike-r-7535
...