You can use the SendMail People Code function to send emails from within People Code. You can also call this function from an Application Engine.
Note: Make sure your SMTP server is configured properly or the SendMail function will fail.
Local string &MAIL_CC, &MAIL_TO, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TITLES, &MAIL_TEXT, &MAIL_FILES, &MAIL_FROM, &REPLYTO, &SENDER;
Local number &MAIL_FLAGS;
&MAIL_FLAGS = 0;
&MAIL_TO = "email-address-message-going-to";
&MAIL_CC = "";
&MAIL_BCC = "";
&MAIL_SUBJECT = "Test email";
&MAIL_TEXT = "Sending an email from PeopleCode.";
&MAIL_FILES = "";
&MAIL_TITLES = "";
&MAIL_FROM = "email-address-message-is-from";
&MAIL_SEP = ";";
&CONTTYPE = "";
&REPLYTO = "";
&SENDER = "";
&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_FROM, &MAIL_SEP, &CONTTYPE, &REPLYTO, &SENDER);
If &RET <> 0 Then
MessageBox(0, "", 0, 0, "Return code from SendMail= " | &RET);
/*Do error processing here*/
End-If;
Note: Make sure your SMTP server is configured properly or the SendMail function will fail.
Local string &MAIL_CC, &MAIL_TO, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TITLES, &MAIL_TEXT, &MAIL_FILES, &MAIL_FROM, &REPLYTO, &SENDER;
Local number &MAIL_FLAGS;
&MAIL_FLAGS = 0;
&MAIL_TO = "email-address-message-going-to";
&MAIL_CC = "";
&MAIL_BCC = "";
&MAIL_SUBJECT = "Test email";
&MAIL_TEXT = "Sending an email from PeopleCode.";
&MAIL_FILES = "";
&MAIL_TITLES = "";
&MAIL_FROM = "email-address-message-is-from";
&MAIL_SEP = ";";
&CONTTYPE = "";
&REPLYTO = "";
&SENDER = "";
&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_FROM, &MAIL_SEP, &CONTTYPE, &REPLYTO, &SENDER);
If &RET <> 0 Then
MessageBox(0, "", 0, 0, "Return code from SendMail= " | &RET);
/*Do error processing here*/
End-If;
Where can i find Peoplesoft Solutions for different problems?
ReplyDeletePeoplesoft HRMS Key Concepts
ReplyDeletePeopleSoft Set Control Field
Adding and Maintaining Person Of Interest in PeopleSoft
Peoplesoft Row Level Security Search Records
Understanding Future dated security in PeopleSoft
Simplified Way to Provide a Page Access in PeopleSoft
SQL Query to Find Direct Reports for a Manager in PeopleSoft
'Override Position Data' and 'Use Position Data' Option in Job Data Page
How the Various Date Fields on Employement Data Page are Updated
PeopleSoft HRMS key Concepts
Understanding Dynamic Prompts in PeopleSoft
Parallel Processing using Temporary Record with Application Engine in PeopleSoft