Here the PeopleCode function to generate an email with attachment
&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_SENDER);
&MAIL_FLAGS = 0;
&MAIL_TO = "Mail To";
&MAIL_CC = "CC To>";
&MAIL_BCC = "BCC";
&MAIL_SUBJECT = "Mail Subject";
&MAIL_TEXT = "Body of the email";
&MAIL_FILES = "Absolute path of the file including file name";
&MAIL_TITLES = "File attachment appear with this name";
&MAIL_SENDER = "Sender name";
Try to get the value of variables from the message catalog.
&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_SENDER);
If Not (&RET = 0) Then
WinMessage("Return status from mail = " | &RET);
End-If;
Monday, September 14, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment