简体   繁体   中英

send mail in android application without smtp.gmail.com

I should send email trough app but I want send it from another mail account (no gmail). I've coded a class Mail and I set host="mail@xxxxxx.xx" but in debug mode I've seen that variable host is = "smtp.gmail.com". How is possible? There is a trick?

You're using the JavaMail API to send the mail, right?

Check the JavaMail FAQ , there's several ways to specify the host you want to connect to, including setting a property or passing it explicitly in the call to the connect method. Without more detail on what exactly you're doing, it's hard to say where you went wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM