On Wed, 21 Jun 2017 21:50:47 +1000, Andrew Rowley wrote:
>
>I have written up a sample Java program to send email from z/OS via
>Gmail here:
>https://www.blackhillsoftware.com/news/2017/06/21/sending-email-from-zos-using-java/
>
>Java on z/OS is a giant leap forward in ease of doing things - when I
>first decided to test this, I Googled "java send email via Gmail" and
>had a test program working within 30 minutes.
>
Nice. I see:
final String username = "smtp-username";
final String password = "smtp-password";
Rather than hard-coding, could these be extracted from RACF (or other?)
database? Or kept in suitably protected user-specific files?
What about headers? Ideally, I might expect:
From: z/OS-ID
Sender: "smtp-username"
or:
Reply-to: z/OS-ID
But would GMail or a corporate mail server tolerate these, which might appear
to be used for forgeries or mail-bombing?
Hardcoding these or a corporate server should not be a problem:
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.port", "587");
Might these be publicized (not stored) on CBTTAPE.org to attract
users to Black Hill's storefront?
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN