The base64 encoded certificate was created using the z/OS Resource Access Control Facility (RACF) EXPORT FORMAT(CERTB64) command. Both of these working (tested) examples will send a base64 encoded certificate as an attachment in an email. Import java.io. The second example also illustrates how to use concatenated datasets within an email body. To keep it simple, some of the arguments are hard coded but you can extend this method to pass them or read it from some config files. Our EmailUtil class that has a single method to send email looks like below, it requires and some other required fields as arguments. So I will create a utility class with some utility methods to send emails and then I will use this utility method with different SMTP servers. They are quite informative and inspirational. The logic to create session differs based on the type of SMTP server, for example if SMTP server doesn’t require any authentication we can create the Session object with some simple properties whereas if it requires TLS or SSL authentication, then logic to create will differ. In addition, I would like to thank Mark Komarinski for sending his material in 1993 and the many system administration columns in Linux Journal. Creating object, we have to set different properties in this object such as recipient email address, Email Subject, Reply-To email, email body, attachments etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |