2013-01-12 72 views
0

我想用javamail發送郵件,但我不希望收件人回覆我。Javamail,將真實的發件人地址隱藏給收件人?

我要顯示我的真實ADRESS [email protected][email protected]

reply to,我使用:

messageMail.setReplyTo(new Address[]{new InternetAddress("[email protected]")}); 

但我可以看到在郵箱真正的發件人。於是我就用:

messageMail.setFrom(new InternetAddress("[email protected]", "[email protected]")); 

但我可以看到在收件人郵箱中[email protected] ADRESS ...

那麼,有沒有一種方法來發送郵件ADRESS完全隱藏到收件人嗎?

+0

由於您使用'myrealadress @ abc.com'從地址 – vels4j

+0

檢查我的帖子,我使用它,但它始終是可能的用戶看到郵件 –

+0

真正ADRESS總結,當我測試發送郵件沒有在我的代碼中無法使用我的真實地址,發件人仍然可以看到我的真實地址... –

回答

1

您可以通過名字指定喜歡

messageMail.setFrom(new InternetAddress("[email protected]", "WebMaster")); 

但通常從名稱和發件人地址發送郵件好的做法告知其隱藏。從地址中使用姓名並回復。何況像do not reply to the sender

+0

嗨,它不起作用。我看到'Webmaster'但是當我在上面指點鼠標,我看到我的真實地址 –

+0

我只是避免讓我真正ADRESS用戶避免垃圾郵件等等 –

+0

更新你的測試代碼 – vels4j

相關問題