× 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.


  • Subject: RE: E-mail notification from AS400
  • From: "Christopher J. Devous" <cdevous@xxxxxxxxxxx>
  • Date: Thu, 8 Mar 2001 08:54:10 -0700
  • Organization: The Antigua Group

Well, I guess there ain't no such thing as a free lunch.

I find the newsgroups and mailing lists helpful because of people's
willingness to share the solutions to problems they've encountered.  I
think that such exchange raises the average level of knowledge for those IT
professionals that participate, and I believe that helps us all.

Authors have to make money too, so I also subscribe to several good
publications, like Midrange Computing, which I find content rich and very
helpful.  But, back to the topic:

If you want to send email from your AS/400, and your AS/400 is not the mail
server in your network, as I understand the original question, you need to
set your system up as an SMTP gateway.  Take the following steps:

1.  Prompt (F4) on the command CHGDSTA.  If the "Route to SMTP gateway"
(SMTPRTE) parameter is *NONE, take the following steps:

2.  Open the TCP configuration menu (CFGTCP) and select option 10, "Work
with TCP/IP host table entries" and verify that your mailserver is listed
in the host table.  If it isn't, add it.

3.  Ping your mail server by name (i.e. PING mailserver.mydomain.myorg) to
make sure your AS/400 can reach it.

4.  Prompt on CHGSMTPA, and verify that "Autostart server" (AUTOSTART) is
*YES, and that "Mail router"  (MAILROUTER) is your mail server (e.g.
mailserver.mydoman.myorg).  Make it be so if it isn't.

5. Add a directory entry for the SMTP gateway connection with the following
command

ADDDIRE USRID(INTERNET GATEWAY) USRD('Internet SMTP Gateway')
SYSNAME(INTERNET) PREFADR(NETUSRID *IBM ATCONTXT)

6.  Change distribution attributes as follows:

CHGDSTA SMTPRTE(INTERNET GATEWAY)

7.  Make sure the SMTP service is started:  STRTCPSVR *SMTP

8.  Send a test message:

SNDDST TYPE(*LMSG) TOINTNET(myemail@mydomain.myorg) DSTD('Testing')
LMSG('Test Message').

If this all works, then you can use the SNDDST command to send email from
your AS/400.  If you get imaginative, you might incorporate this into
MONMSG commands in your CL programs....

I must credit bytware.com, which is where I first found the previous
information in a very usable form. For free, even:

http://www.bytware.com/Support/MPlus/egateway.html

Also, if you want an easy way to send spooled reports via email, license
Brad Stone's spooled file tools, and download it's free spl2email utility:

http://www.bvstools.com/spltool.html

I think the license fee is $150 U.S.  I've been using SPLTOOL for a couple
of years now for a lot of stuff, and I can tell you for certain, it is well
worth it. 

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.