-
Sub-task
-
Resolution: Unresolved
-
Major
-
2.17.0.Final
It would be good to have a command to quickly add a new MailSessionDefinition to allow sending an email :
email-add-session-definition --named java:comp/myMailSession --host smtp.gmail.com --transportProtocol smtps
This will create a new class called org.myproject.email.MailResources if it doesn't exist, and will add a new MailSessionDefinition :
package org.myproject.email; @MailSessionDefinitions({ @MailSessionDefinition( name = "java:comp/myMailSession", host = "smtp.gmail.com", transportProtocol = "smtps" ) }) public class MailResources { }
Tying the command a second time will add a new MailSessionDefinition to the exiting MailSessionDefinitions :
package org.myproject.email; @MailSessionDefinition( name = "java:comp/myMailSession", host = "smtp.gmail.com", transportProtocol = "smtps" ), @MailSessionDefinition( ... ) }) public class MailResources { }