Sending a user defined html document as an email from AS/400

Tags:
Development
I have a requirement to allow a user to create and/or maintain an html document that will be used as a shipment confirmation email. The document must contain "tags" so that I can insert variable data from the AS/400 (such as UPS Tracking Number, Consignee Name, etc.) into the document before it is sent. The document will be sent via SMTP from the AS/400. Can someone give me some ideas as to an "easy" way to accomplish this. I'm thinking the document needs to be stored in the IFS or in QDLS somewhere. But any ideas are appreciated. thanks in advance.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Look at the MMAIL utility available at:
http://www-922.ibm.com/easy400p/downloads.html

I’ve used it for some basic email stuff, but it can send an IFS file as either the email itself or as an attachment. You can dynamically create an IFS file (with your embedded HTML tags) with the info you want – then use MMAIL to do the email part.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • StanleyVong
    Since it is mentioned that an html needs to be stored in IFS, I assume you want to build the email using RPG. Am definitely not an expert on this, but have been experimenting similar projects using Java recently and would like to share my 2 cents so that I can benefit from others' opinion as well. 1) read the data (UPS tracking nbr, etc.) from the file, build the html string programmatically and set it as the content of the email using MimeBodyPart and MimeMultipart of Java, then you can send the email via SMTP. 2) open an HTTPConnection to another JSP page which will be responsible to read the file, include the data and determine how the http portion of the email look like, then pull the content as a string and set it as the content of the email same as described above - don't know if this is feasible or not - I thought about this for a while but never tried it out, this isolates how the email look like but then I am not sure how to embed images into the email, also this option requires setting up Tomcat or WAS on the iSeries. Hope this helps.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: