Sendmail with Attachment in Function
Hi Gurus,
I'm trying to set up a function that utilizes sendmail with an attachment. I have created an html view to display a record, and my function to 'show pdf' works well. I'd like to be able to trigger a function to send an email with said pdf attachment, but I get a generic "Error in executing SendMail task" error. If I remove the code for the attachment, it works. Can anybody help?
- void BEO.sendBEO(Events thisEventID)
- {
- thisEvent = Events [ID == thisEventID.ID.toLong()];
- Title = thisEvent.Event_Title;
- Date = thisEvent.Function_Date;
- thisID = thisEvent.ID;
- sendmail
- (
- To : zoho.loginuserid
- From : zoho.adminuserid
- CC : zoho.adminuserid
- Subject : "Request for Catering Services for " + Title + " on " + Date + "."
- Message : "Request for Catering Services for " + Title + " on " + Date + "."
- Attachments : view:BEO[ID = thisID] as PDF
- )
- }