简体   繁体   English

在没有smtp.gmail.com的android应用程序中发送邮件

[英]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.

相关问题 当我尝试在Android上通过smtp.gmail.com发送电子邮件时,总是得到“权限被拒绝” - I always got “permission denied” when I try to send email by smtp.gmail.com on Android ERROR ANDROID:无法连接到SMTP主机:smtp.gmail.com,port:465,响应:-1 - ERROR ANDROID: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1 javax.mail.MessagingException:无法连接到SMTP主机:smtp.gmail.com,端口:587无法管理解决此问题 - javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587 Can not manage to solve this problem 如何解决以下问题:javax.mail.MessagingException:无法连接到 SMTP 主机:smtp.gmail.com,端口:465;? - How to solve the issue with: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;? 无法连接到SMTP主机:smtp.gmail.com,端口:465 - could not connect to smtp host:smtp.gmail.com, port:465 在Android中发送电子邮件而无需意图或GMail SMTP - Send email in Android WITHOUT intent or GMail SMTP 从ping smtp.gmail.com请求超时 - Request timeout from pinging smtp.gmail.com 从android发送邮件,而无需使用smtp和用户交互 - send mail from android without using smtp and user interaction Android使用SMTP发送邮件到Gmail - Android Sending mail to gmail using smtp 使用Javax邮件发送不带Gmail的邮件 - Send mail without Gmail using javax mail
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM