【问题标题】:How to connect to Office365 SMTP with STARTTLS? I keep getting "send hello first" error如何使用 STARTTLS 连接到 Office365 SMTP?我不断收到“先发送问候”错误
【发布时间】:2016-05-13 08:23:03
【问题描述】:

我正在尝试使用 STARTTLS(在 smtp.office365.com 端口 587 上)连接到 Office365 SMTP 服务器。当我发送AUTH PLAIN 时,它会显示503 5.5.2 Send hello first。我做错了什么?

这是我与服务器的对话: 02-03 02:58:56.951: I/System.out(1547): 220 MEXPR01CA0064.outlook.office365.com Microsoft ESMTP MAIL Service ready at Wed, 3 Feb 2016 07:58:55 +0000 02-03 02:58:59.781: I/System.out(1547): EHLO codolutions.com 02-03 02:59:12.841: I/System.out(1547): 250-MEXPR01CA0064.outlook.office365.com Hello [49.180.156.25] 02-03 02:59:12.841: I/System.out(1547): 250-SIZE 157286400 02-03 02:59:12.841: I/System.out(1547): 250-PIPELINING 02-03 02:59:12.841: I/System.out(1547): 250-DSN 02-03 02:59:12.841: I/System.out(1547): 250-ENHANCEDSTATUSCODES 02-03 02:59:12.841: I/System.out(1547): 250-STARTTLS 02-03 02:59:12.851: I/System.out(1547): 250-8BITMIME 02-03 02:59:12.851: I/System.out(1547): 250-BINARYMIME 02-03 02:59:12.851: I/System.out(1547): 250 CHUNKING 02-03 02:59:14.591: I/System.out(1547): STARTTLS 02-03 02:59:14.661: I/System.out(1547): 220 2.0.0 SMTP server ready 02-03 02:59:21.421: I/System.out(1547): AUTH PLAIN 02-03 02:59:26.491: I/System.out(1547): 503 5.5.2 Send hello first

我也尝试过在 EHLO 之前发送 STARTTLS,也尝试过发送 HELO,但没有成功。

附:我在 Android 中使用 Apache Commons Net。

【问题讨论】:

  • 在哪个命令上显示“先发送问候”?
  • 请看上面对话的最后一行。

标签: android smtp office365 apache-commons-net


【解决方案1】:

找到答案: 我不得不在 STARTTLS (#WTF) 之后发送另一个 HELO/EHLO。

【讨论】:

    猜你喜欢
    • 2021-11-20
    • 2020-06-25
    • 2019-03-04
    • 1970-01-01
    • 1970-01-01
    • 2012-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多