Question

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?

Était-ce utile?

La 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

Autres conseils

JavaMail uses "mail.smtp.user" as the default user name to login to the SMTP mail server.

JavaMail does not use properties named "username" or "password" at all.

The destination address is set using (e.g.) msg.setRecipients(Message.RecipientType.TO, "joe@example.com").

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top