[英]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). 我应该通过应用程序发送电子邮件,但我想从另一个邮件帐户(无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".
我已经编写了Mail类,并设置了host =“ mail@xxxxxx.xx”,但是在调试模式下,我看到变量host是=“ smtp.gmail.com”。 How is possible?
怎么可能? There is a trick?
有把戏吗?
You're using the JavaMail API to send the mail, right? 您正在使用JavaMail API发送邮件,对吗?
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. 检查JavaMail FAQ ,有几种方法可以指定要连接的主机,包括设置属性或在对connect方法的调用中显式传递它。 Without more detail on what exactly you're doing, it's hard to say where you went wrong.
没有更多关于您到底在做什么的详细信息,很难说出您出了错。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.