× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi, Scott,

I just found an article by you, entitle 'Send E-Mail Messages from SMTP',
that appeared on the System i network
(http://systeminetwork.com/article/send-e-mail-messages-smtp). It was from
August 2006. I especially appreciated the explanation of the distinctions
of MUA, MTA, and MTDs. May I ask a few questions on that article?

I tried the telnet process described in your article. It didn't work for me
(I was trying to use the iSeries SMTP server). Must be something I still
don't understand because I CAN use the SNDDST command on my iSeries (so I
know the SMTP Server is set up correctly). What am I not understanding?

I love the idea of using native RPG code, as you present in your article, to
accomplish my e-mail requirements. However, I didn't see how I might attach
a pdf file to the e-mail. Again, I probably am still ignorant about a lot
and probably missed a clear example of how to do it. Can you advise me?

Thanks for all your contributions to message boards and your published
articles. When I see one with your byline, I always read it.

Best Regards,

Tom Garvey


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Scott Klement
Sent: Thursday, March 20, 2008 5:33 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: SMTP server name

Hi Thomas,

I recommend (as I stated earlier) providing a configuration of some sort.
(Maybe it's just a data area or an environment variable). Have the user set
the SMTP server in that configuration.

Then tell JavaMail (or whatever software you decide to use) to use the
SMTP server from the configuration. Personally, I'm partial to writing
my own in RPG -- I have little interest in using JavaMail, I'd rather have a
pure RPG solution that does the same thing -- but it doesn't matter to this
discussion. The point is, have a per-installation configuration value
somewhere that tells your software what the SMTP server is, and then
communicate with that SMTP server.

If you want to connect to the SMTP server on the same system, use
'localhost' as the host name. If you want to connect to one elsewhere (on
the Internet -- provided you've been given authorization to do so -- or on
the LAN -- many companies provide a central SMTP server on Windows or Linux)
then all you have to do is set the host name to right name and you're set.

I doubt very much that Yahoo! will let you use their mail server, but if
they do, all you'd have to do is set their mail server in the configuration.



Thomas Garvey wrote:
I think a description of what I'm trying to do would help.

I have a batch process that creates a spooled file, which is converted
into
a pdf file (stored in the IFS). This pdf file needs to be sent, as an
attachment, to an e-mail address. This whole process needs to be able to
work on any and all iSeries (from v5r3 and up) without having to do any
mail
server setup or modification to any configuration. The e-mail destination
is NOT a user found on the iSeries.

So, it seemed that using JavaMail wrapped in RPG would allow me to avoid
use
of SNDDST (which has user profile and configuration problems for me), and
MIGHT allow me to use a mail server reference of my choice (as it appears
that setting the mail server name is all I need). If the SMTP server was
configured on the iSeries the process finds itself running on, then it
could
use IT. If the iSeries is NOT configured as a mail server (or the SMTP
server was not active), the JavaMail properties might allow me to use
another server (like YAHOO.COM?), as long as the iSeries could talk to the
world over TCP/IP.

I know I may be dreaming here, but it sure seems like there should be a
way
to do what I need to do.

If I've been smoking the wrong kind of tobacco here, let me know.

Tom Garvey


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.