Send a Mime Mail

page d'accueil
Boite � outils

Cette page a �t� mise � jour le 14 septembre 2009
Contact

Welcome page
Tools box

Versionning 

last version : The SaveFiles

This tool based on the api QtmmSendMail (a procedure from QTCP/QTMMSNDM) implements main rfc822 & rfc1521 recommendations. It can send many documents attached and a body in text or html format to many receivers. It's not JavaMail, it's pure native code. If it's your target, you can find an implementation of javaMail at Java From Rpg


MAIL SUBJECT('a new mail tool') SENDER(*me) RECEIVER((*TO 'you@company.com') (*CC 'you@company.com') (*BCC 'you@company.com')) MESSAGE('<html><body><h3>Hello,<br>How are you ?</h3></body></html>') MSGTYPE('text/html') ATTACH((*BIN *ATTACHED 'image/jpeg' '/jpl/jpl.bmp'))

mail builds a temporary IFS file that is sent to recipient by the API. I have located this file with the data area MAIL

You need to run one time these two commands:


CRTDIR DIR('/Mail') RSTDRNMUNL(*NO)

CRTDTAARA DTAARA(JPLTOOLS/MAIL)
TYPE(*CHAR)
LEN(100)
VALUE('/Mail')
TEXT('Mail temporary files root')

qtmmsendmail is an interface to QMSF  (the Mail Service Framework of the 400). If SNDDST already works on your 400, then you don't need more configuration. If no, have a look at http://jplamontre.free.fr/AS400/SolvingEmailProblem.htm or http://iseries.pentontech.com/t?ctl=35231:11FF94