Setting the “from” header field in Java MimeMessage not working correctly

前端 未结 1 1138
北海茫月
北海茫月 2021-01-24 23:09

For a web application I\'m working on I made a method to send email notifications. The message has to come from a specific account, but I would like the \"from\" header field to

1条回答
  •  不要未来只要你来
    2021-01-24 23:59

    What you are looking to do is called "spoofing." It appears as though you are using Google's SMTP servers, if this is the case, you will not be able to do this successfully. For security purposes, Google will only allow the "from" address to be the authenticated email address.

    See this related question

    0 讨论(0)
提交回复
热议问题