Skip to content

danielsoro/send-mail-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

send-mail-server

Simple example about sending mail on WildFly. :-)

Configuration JavaMail in WildFly 8

Example into standalone.xml

<mail-session name="App" jndi-name="java:/mail/gmail">
   <smtp-server outbound-socket-binding-ref="mail-smtp-gmail" ssl="true" 
      username="email@gmail.com" password="your_password"/>
</mail-session>
<outbound-socket-binding name="mail-smtp-gmail">
   <remote-destination host="smtp.gmail.com" port="465"/>
</outbound-socket-binding>

Example with jboss-cli

/socket-binding-group=standard-sockets/
   remote-destination-outbound-socket-binding=mail-smtp-gmail:add(host=smtp.gmail.com,port=465)
/subsystem=mail/mail-session=App:add(jndi-name=java:/mail/gmail,from="email@gmail.com",debug=true)
/subsystem=mail/mail-session=App/
   server=smtp:add(outbound-socket-binding-ref=mail-smtp-gmail, 
                     username=email@gmail.com, password=your_password, ssl=true)

About

Simples example about sending mail on WildFly. :-)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages