On 19/09/2024 4:43 am, Samuel Alejandro Díaz Chávez wrote:
So I ask for your support to know if there is a way to send an email through a 
python program executed by BATCH and if you have any example, I would also 
appreciate it very much.

One of the advantages of languages like Python and Java on z/OS is that the answer to "how do I" on z/OS is often the same as "how do I" on any other platform.

I don't know Python, but I would expect it to be able to simply connect to your corporate mail server and send an email, the same as other mail programs. The SMTP portion on z/OS becomes redundant. Unless you have a clear need to use the SMTP server on z/OS that's what I would try to do.

I wrote up a similar approach connecting to Gmail using Java here (it's a bit old now but should give the idea):

https://www.blackhillsoftware.com/news/2017/06/21/sending-email-from-zos-using-java/

--
Andrew Rowley
Black Hill Software

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to