MH16
MH16

Reputation: 2356

How to use JavaMail API in android to send mail from any email Account?

I am working on mail sending application. I have successfully integrated JavaMail API to work with Gmail account using gmail authentication. I want to know whether , this Api will work with other mail accounts too?

Upvotes: 3

Views: 640

Answers (2)

praetorian droid
praetorian droid

Reputation: 3029

You can use any SMTP server to send a message with JavaMail and any account on that servers. If you want to send a message with From field other than default for given server/account, it depends entirely on SMTP server that you use. Some of it could permit to set an arbitrary From field value, but most of it - not. Anyway it's not about JavaMail, it's about SMTP.

Upvotes: 2

Pattabi Raman
Pattabi Raman

Reputation: 5854

The sender will be the gmail by default. to change the sender mail id account type to other such as yahoo or hotmail, you have to configure its settings such as port and smtp server name.

Upvotes: 3

Related Questions