Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javamail with OCI email delivery qst

2837077Sep 19 2019 — edited Sep 20 2019

hi,

I’m trying to configure Javamail with OCI email delivery, I’m using this AWS doc as a starting guide (using eclipse) however I think I have some settings incorrect. I’ve commented out ‘configset’.

I have configured OCI Email Delivery with Peoplesoft, Ebusiness and Swaks…now I’m trying with Javamail although I’m not a java programmer.

I have ‘starttls’ enabled which is required as JavaMail does not use TLS version 1.2 by default so I need to specify this version, this is my code, not sure if correct…

mail.smtp.ssl.protocols=TLSv1.2

Notes on SSL with JavaMail…. https://www.oracle.com/technetwork/java/javamail/javamail146sslnotes-1904573.html

…mentions that you use one statement or the other, so not sure if ‘ssl.enable’ should be commented out if I have ‘starttls.enable’ set to ‘true’.

    props.put("mail.smtp.ssl.enable", "true");

    // or: props.put("mail.smtp.starttls.enable", "true");


Also, AUTH PLAIN is the only SMTP authentication currently supported for OCI Email Delivery. So I need to make sure AUTH LOGIN is disabled and AUTH PLAIN is used….but not sure how to code this.

Some references I found below are a guide but would welcome some help if anyone is more familiar with javamail.

Thanks

John

References:

OCI SMTP config requirements:

https://docs.cloud.oracle.com/iaas/Content/Email/Tasks/configuresmtpconnection.htm


AWS SES with Javamail…

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-java.html

https://hellokoding.com/sending-mail-with-amazon-ses-smtp-and-java-mail-api/

Notes on SSL with JavaMail….

https://www.oracle.com/technetwork/java/javamail/javamail146sslnotes-1904573.html

This post has been answered by 2837077 on Sep 20 2019
Jump to Answer
Comments
Post Details
Added on Sep 19 2019
1 comment
362 views