5 pts.
 Sending HTML emails directly from the AS/400
Our company uses the AS/400. As the person responsible for E-MarketingĀ I would like to be able to send HTML based emails to industry specific targets, I do not want to send PDF attachments but would rather send actual HTML email with images and in color. Is this possible?

Software/Hardware used:
AS/400 i series
ASKED: January 20, 2011  2:27 PM
UPDATED: March 2, 2011  3:45 PM

Answer Wiki:
Hi, You could try the SNDDST command, specifying the following parameters: TYPE = *LMSG - long message TOINTNET = email address - this address must be in the directory list. (Press F1 to read about it). SUBJECT = 60 chars max LONGMSG = The body email content I think you can put html code into LONGMSG parameter, and maybe include the image, encoding it to Base64 (google for "embedding images in html" to see how to do that). Another way is to write a Java application that uses the Java mail API to send emails, and call it from RPG code. To use java classes from RPG read this http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.pgmgd.doc/c0925076172.htm Regards.
Last Wiki Answer Submitted:  January 20, 2011  9:05 pm  by  Mariodlg   2,790 pts.
All Answer Wiki Contributors:  Mariodlg   2,790 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi,
There is very good routine available from Easy400.net and is free

Good luck
YuVa

 1,285 pts.

 

I tried to use the Easy400.net code to put an PDF image in a email and it would not work. I could put the image on the email as a attachment, but not on the email its self.

 315 pts.

 

@ 65GTO my friend and i have been trying to put the image on the email as a attachment but cant seem to win. If its not asking too much with you can you please forward me the code

 55 pts.

 

I’m not an AS-400 developer, but I found this elsewhere:

CPYTOIMPF FROMFILE(MYLIB/MYFILE) TOFLR(TEMP) TODOC(MYFILE.TXT) REPLACE(*YES)

SNDDST TYPE(*DOC) TOINTNET((my.name@company.com)) DSTD(A) MSG(Message) DOC(FILE.TXT) FLR(TEMP)

 55 pts.