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



When you use a TELNET client to connect to a non-telnet port on another
machine, all you are really doing is opening a socket to that machine
and directing i/o from the socket to go to/from the workstation.

If you want to do so "in batch mode" (i.e. taking the input and output
from a program rather than a keyboard and monitor) you do so with the
socket APIs.

I wrote a tutorial for using the socket API in RPG IV here:
http://klement.dstorm.net/rpg/socktut/

For details on the "commands" that you can send to an SMTP server,
here's the internet standard:
ftp://ftp.isi.edu/in-notes/rfc821.txt

The contents of an e-mail message tend to be a bit more complicated,
however.  The "basics" (the original standard) is here:
ftp://ftp.isi.edu/in-notes/rfc822.txt

But are expanded greatly with the use of MIME.   So if you need to get
into more complex messages, you'll want to go to
http://www.rfc-editor.org and search for anything related to MIME, SMTP
or MAIL.

Good luck...

On Fri, 14 Sep 2001 DAhKow@ibl.intnet.mu wrote:

>
> Hi,
>
>      this query might sound a bit weird to some of you but here goes:
>
> We would like to send e-mails (with attached text files) from the AS/400.
> Of course we can use the SNDDST command to do this (as suggested by
> numerous posts in this very list). We've tried that and it works fine.
> However, it is our understanding that the SMTP server MUST be active for
> this to work. This was the case in our tests. When we downed the SMTP
> server, no mail was sent.
> The problem is that  this SMTP process on the AS400 is 'visible' on the
> internet & hence can be prone to attacks (let's forget about any firewall
> issue for the time being).
> In fact our mail server is a linux box running Notes. What we would like to
> do is to use that linux mail server as a SMTP relay to send the e-mail from
> the AS400. This works fine interactively : You can telnet, from an AS400
> screen to that mail server and specify port 25 (the SMTP default port) to
> request the mail server to send mail
> e.g TELNET  ip address 25.
> This gives you a SMTP conversation with the linux mail server which will
> relay mails from the AS400 to any e-mail address. We have tried this and it
> works ok. And this does not require the AS400 SMTP server to be active,
> hence not accessible on the internet.
> Our problem is that want to automate this e-mail sending process using
> telnet in 'batch' mode.  (This is similar to using FTP in batch mode by
> overriding the input to a file containing FTP commands).
>
> This may seems a bit convoluted but is the above possible and has anyone
> done this? We would be glad to have your input.
>
>
> Regards
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.