문제

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