Check out the following links:
and check MIME & Mail
The Easy400 MMAIL is a free download that has been very successful. That’s already noted in earlier comments.
But the answer to your question is that the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzair/rzairsendrece.htm”>QtmmSendMail API</a> is available directly to ILE RPG. If you understand how SMTP e-mail works, then the API is relatively easy.
If you don’t already know what SMTP requires, and how concepts like MIME are important, then you’re far better off using something like MMAIL. You’re essentially creating an actual e-mail client when you call QtmmSendMail. You can’t just send any string of bytes you want — they have to be prepared.