Pergunta

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?

Foi útil?

Solução

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

Outras dicas

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").

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top