android从outlook以编程方式发送电子邮件

android从outlook以编程方式发送电子邮件,android,email,outlook,Android,Email,Outlook,我使用answer通过一个Google帐户以编程方式发送电子邮件,效果很好。但我想从非谷歌账户发送,比如我的outlook.com 是否有可能使用from asmyemailusername@outlook.com作为域 正如我建议的那样,我试图改变现状 从smtp.gmail.com 从465 但我仍然得到以下例外。有什么线索可以解决吗 javax.mail.MessagingException: Could not connect to SMTP host: smtp-mail.outloo

我使用answer通过一个Google帐户以编程方式发送电子邮件,效果很好。但我想从非谷歌账户发送,比如我的
outlook.com

是否有可能使用from as
myemailusername@outlook.com
作为域

正如我建议的那样,我试图改变现状

smtp.gmail.com
465

但我仍然得到以下例外。有什么线索可以解决吗

javax.mail.MessagingException: Could not connect to SMTP host: smtp-mail.outlook.com, port: 587;
  nested exception is:
    javax.net.ssl.SSLException: Unable to parse TLS packet header