Search code examples
javasmtpjakarta-mailjndicontext.xml

JavaxMail JNDI properties: mail.smtp.user vs username


What's the difference between mail.smtp.user and username? Are either where I specify the destination address (to field)? If not, what property does the destination address correspond to?


Solution

  • Hope this helps:

    • mail.smtp.user property can be set to provide a default username for the callback
    • username and password are used during the Call the Transport connect method explicitly

    source