Skip to content

Instantly share code, notes, and snippets.

@MiloCasagrande
Created April 27, 2012 13:29
Show Gist options
  • Select an option

  • Save MiloCasagrande/2509214 to your computer and use it in GitHub Desktop.

Select an option

Save MiloCasagrande/2509214 to your computer and use it in GitHub Desktop.
New Glassfish JavaMail Session
asadmin --user admin create-javamail-resource --mailhost="smtp.gmail.com" --mailuser="GMAIL_USERNAME" --fromaddress="GMAIL_ADDRESS" --debug="false" --enabled="true" --description="A new JavaMail Session!" --property="mail.smtp.password=YOUR_PASSWORD:mail.smtp.auth=true:mail.smtp.port=465:mail.smtp.socketFactory.fallback=false:mail.smtp.socketFactory.port=465:mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory" "mail/newsession"
@bshannon

bshannon commented Jul 7, 2016

Copy link
Copy Markdown

The socket factory and port properties aren't needed, just set mail.smtp.ssl.enable=true.

@pjaa

pjaa commented Jan 15, 2018

Copy link
Copy Markdown

How to update a "additional property"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment