Following this thread : Sending Email in Android using JavaMail API without using the default/built-in app , I've tried to send a mail from a yahoo account using smtp.mail.yahoo.com and 465 as a port. The mail is sent but no sender is attached to the mail. If I send from a gmail account the user address is attached..

Any help will be aprecieted!

有帮助吗?

解决方案

Fount the answer! In the example was

message.setSender(new InternetAddress(sender)); 

and I've changed it to

message.setFrom(new InternetAddress(sender)); !
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top