Advertisement
Guest User

Untitled

a guest
Jan 12th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #Goto WildFly Home
  2. cd $WILDFLY_HOME/bin
  3.  
  4. #Open JBOSS Command Line Tool
  5. ./jboss-cli.sh
  6.  
  7. #Define a outbound-socket-binding named “MyMailSMTP”
  8.  
  9.  
  10. /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=MyMailSMTP:add( \
  11. host=smtp.sendgrid.net, \
  12. port=465)
  13.  
  14.  
  15. #Define a JavaMail session named “MyMail”
  16.  
  17. /subsystem=mail/mail-session=MyMail:add(jndi-name="java:jboss/mail/gmail", from="exampe@example.com", debug=true)
  18.  
  19. #Add a reference from “MyMail” to “MyMailSMTP”
  20.  
  21. /subsystem=mail/mail-session=MyMail/server=smtp:add( \
  22. outbound-socket-binding-ref=MyMailSMTP, \
  23. ssl=true, \
  24. username=sendgrid_username, \
  25. password=sendgrid_password)
  26.  
  27. #Reload Setting to reflect new changes
  28. reload
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement