Send mail using peoplecode.
Alternative to SendMail Function : PT_MCF_MAIL
You can use Application package PT_MCF_MAIL (PeopleTools 8.46 or higher only) to generate emails instead of using SendMail peoplecode function.
Go to the PeopleBooks to get the complete description.
Home > PeopleBooks > Enterprise PeopleTools 8.48 PeopleBook: PeopleCode API Reference > Mail Classes
Go to Mail Classed Example section to see How to use these classes. Following examples are provided.
Creating Text Email 
Creating Email and Overriding SMTP Settings 
Creating HTML Email 
Creating Multi-Part Email With Both Text and HTML Parts 
Creating HTML Email with Images 
Creating Email with Attachments 
Creating Email Attachments Specifying a URL 
Creating Multiple Emails 
Authenticating Email While Sending
Advantages
Structured Code 
Can generate HTML Email 
Can override Default SMTP Parameters 
Better Error Handling 
Send emails  return receipt request (email reception notification) 
Ability to set Message priority