|
Not free but one more to add to the list. http://iseries.msp.be/ Sending an email from RPG looks like this.... /free pSMTP = CreateMessage(); smtpok = SetOriginator(pSMTP:%trim(ClEmFrom):%trim(ClEmFromn)); smtpok = AddRecipient(pSMTP:'*TO':%trim(ClEmail):%trim(ClEmailn)); smtpok = AddRecipient(pSMTP:'*CC':%trim(ClEmcc):%trim(ClEmncc)); smtpok = SetSubject(pSMTP:%trim(ClEmsub)); smtpok = AddText(pSMTP:'*TEXT':%trim(Message)); smtpok = AddText(pSMTP:'*HTML':%trim(HTMLMsg)); smtpok = AddAttachment(pSMTP:%trim(ClEmIFS)); smtpok = SendMail(pSMTP); /end-free I think a lot of the other free or purchased e-mail senders work just as easy, the reason we went with this utility was that it can send an e-mail with both plain text and HTML mime sections so people with HTML e-mail clients will see HTML and people without will see plain text. If your just about to start sending lots of e-mails from your apps you might want to consider what we are currently doing. Instead of having lots of programs all sending e-mails (a quick source scan found 100 CL programs with SNDDST or SNDEMAIL commands) we are converting all our apps to write the e-mail data to a database. Then we have a never-ending job that reads the database and sends the e-mail. The "best" way to send e-mails has changed over time and I think there will be better ways in the future. Once we get done with this project we will have one program that sends e-mails. When a better way comes along we will have one application to change. We have also found that our users constantly ask "Are you sure that e-mail got sent? Can you prove it? What exactly did it say? I think your program has a bug and sent the wrong message. I never got that e-mail. can you resend it?" Our current backup proof is to e-mail ourselves copies of e-mails as BCC so we have it to look at. We plan on keeping the data in this database for at least 6 months, maybe more. We can prove what was sent by looking in the database. We can see exactly what was sent, when and to whom. We can resend an e-mail by removing the sent tag. If our campus SMTP gateway is down when we happen to be sending 6,000 e-mails to students and none of them get sent, we can resend all 6,000 with a quick SQL to mass reset the send tag.
rpg400-l@xxxxxxxxxxxxxxxx 8/3/2006 8:19:23 PM >>>
At my previous job we had MAILTOOL from bvstools.com which I used to
send
email from within RPG programs. While the RPG interface I had was far
from
perfect, it did work. Before I go to my new employer with suggesting purchasing that same product I want to see what other options there
are. Free E-mail Tools: a) There's a CL command called SNDDST that comes with i5/OS that works okay for simple e-mails. It has some sharp limits (5000 chars for a message -- only one attachment -- attachment must be in /QDLS) but it's free. b) There's the Mime & Mail open source utility from http://www.easy400.net c) There's SNDM from Uzaemon (Freeware) http://homepage1.nifty.com/uzaemon/ d) There's Dave Leland's SNDEMAIL. There are significant flaws in the way it does character translation, and it assumes that all attachments are plain text (so if they're not, they'll either be corrupted, or will cause "unpredictable results" to occur with SMTP servers) I strongly recommend against this tool. http://www.iseriesnetwork.com/article.cfm?id=2806 e) I've written an article that demonstrates writing an e-mail message directly from RPG (with IFS & QtmmSendMail APIs): http://www.iseriesnetwork.com/article.cfm?id=52911 That article is inteded to be a "part 1" article, future articles will talk more about how to send without QtmmSendMail. But that article stands on it's own, too. f) There's also the JavaMail API, but I don't have any pointers to info about it.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.