Good morning, In the simplest form you need to have TCP/IP access to a mail (SMTP) server. Without taking into account encryption or authentication the basic process is simple:
- connect to the server via PORT 25 (other ports for other protocols) - send HELO my_identification - send MAIL FROM: [email protected] - send RCPT TO: [email protected] - send data lines (last one is "." - just a dot) - send QUIT In the data section you could have: sender, receiver, subject Someone mentioned curl. This is another method: https://everything.curl.dev/usingcurl/smtp.html best regards Mike -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Schmitt, Michael Sent: Mittwoch, 5. Februar 2025 00:31 To: [email protected] Subject: SMTP Mail on Unix without SMTP Gateway I have a large REXX exec (actually, a set of execs) that creates email in SMTP format. The exec can convert mainframe files into MIME encoded attachments, with carriage control conversion. And there's a lot of other features. The way it actually sends the email is it generates a stem variable whose lines are STTP format data, then writes that to a DD. The DD has an output destination which is the z/OS Communications Server SMTP gateway on some other system. What I want to do now is use that SMTP data to send email by talking directly to an SMTP server, without using the z/OS SMTP gateway. Is there some Unix way to do this? Preferably that I can call from REXX, but if not that, I can use shell scripts, Python, etc. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
