如何修复Chilkat ActiveX SendEmail错误

问题描述

使用Delphi Chilkat ActiveX。

我的IMAPS和TChilkatMailman(Mailman)连接成功。

Mailman.SMTPConnect和MailMan.SMTPAuthenticate都返回1,所以我认为我的连接很好。

这是我的delphi代码:

email2    := TChilkatEmail.Create(Self);
email2.Subject := 'Test Email';
email2.From    := 'simonw@chemigraphic.co.uk';
email2.AddTo('simon wood','simonw@chemigraphic.co.uk');
email2.Body := 'An Email Body';
email2.Sender := 'simonw@chemigraphic.co.uk';
mailman.SendEmail(email2.ControlInterface);

LastErrorText产生:

ChilkatLog:
  SendEmail:
    DllDate: Jun 25 2020
    ChilkatVersion: 9.5.0.83
    UnlockPrefix: CHEMIGRAPHMAILQ
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    sendEmailInner:
      renderToMime_pt1:
        createEmailForSending:
          Auto-generating Message-ID
        --createEmailForSending
      --renderToMime_pt1
      sendMimeInner:
        ensureSmtpSession:
          ensureSmtpConnection:
            smtpParams:
              SmtpHost: smtp.office365.com
              SmtpPort: 587
              SmtpUsername: 
              SmtpSsl: 0
              StartTLS: 1
            --smtpParams
            smtpConnect:
              smtpHostname: smtp.office365.com
              smtpPort: 587
              connectionIsReady:
                Using existing/open SMTP connection to send email.
              --connectionIsReady
              Reconnecting because the connection has been idle for too long.
              smtpSocketConnect:
                socketOptions:
                  SO_SNDBUF: 262144
                  SO_RCVBUF: 4194304
                  TCP_NODELAY: 1
                  SO_KEEPALIVE: 1
                --socketOptions
              --smtpSocketConnect
              smtpGreeting:
                readSmtpResponse:
                  SmtpCmdResp: 220 LO2P265CA0380.outlook.office365.com Microsoft ESMTP MAIL Service ready at Tue,11 Aug 2020 13:59:35 +0000
                --readSmtpResponse
              --smtpGreeting
              startTLS:
                sendCmdToSmtp:
                  SmtpCmdSent: EHLO SIMON
                --sendCmdToSmtp
                readSmtpResponse:
                  SmtpCmdResp: 250-LO2P265CA0380.outlook.office365.com Hello [217.20.31.34]
                  SmtpCmdResp: 250-SIZE 157286400
                  SmtpCmdResp: 250-PIPELINING
                  SmtpCmdResp: 250-DSN
                  SmtpCmdResp: 250-ENHANCEDSTATUSCODES
                  SmtpCmdResp: 250-STARTTLS
                  SmtpCmdResp: 250-8BITMIME
                  SmtpCmdResp: 250-BINARYMIME
                  SmtpCmdResp: 250-CHUNKING
                  SmtpCmdResp: 250 SMTPUTF8
                --readSmtpResponse
                sendCmdToSmtp:
                  SmtpCmdSent: STARTTLS
                --sendCmdToSmtp
                readSmtpResponse:
                  SmtpCmdResp: 220 2.0.0 SMTP server ready
                --readSmtpResponse
                TLS connection established.
              --startTLS
              ehloCommand:
                sendCmdToSmtp:
                  SmtpCmdSent: EHLO SIMON
                --sendCmdToSmtp
                readSmtpResponse:
                  SmtpCmdResp: 250-LO2P265CA0380.outlook.office365.com Hello [217.20.31.34]
                  SmtpCmdResp: 250-SIZE 157286400
                  SmtpCmdResp: 250-PIPELINING
                  SmtpCmdResp: 250-DSN
                  SmtpCmdResp: 250-ENHANCEDSTATUSCODES
                  SmtpCmdResp: 250-AUTH LOGIN XOAUTH2
                  SmtpCmdResp: 250-8BITMIME
                  SmtpCmdResp: 250-BINARYMIME
                  SmtpCmdResp: 250-CHUNKING
                  SmtpCmdResp: 250 SMTPUTF8
                --readSmtpResponse
              --ehloCommand
            --smtpConnect
          --ensureSmtpConnection
          ensureSmtpAuthenticated:
            smtpAuthenticate:
              No SMTP login provided.
              No SMTP password or OAuth2 access token provided.
              Skipping SMTP authentication because no login/password provided.
              smtp_host: smtp.office365.com
              smtp_port: 587
              smtp_user: NULL
              auth-method: NONE
              smtpAuthMethod: NONE
              smtpAuthenticate:
                login_method: NONE or already authenticated
              --smtpAuthenticate
              ConnectionType: SSL/TLS
            --smtpAuthenticate
          --ensureSmtpAuthenticated
        --ensureSmtpSession
        sendSmtpEmail:
          sendWithPipelining:
            sendMailFrom:
              mailFrom: simonw@chemigraphic.co.uk
              sendCmdToSmtp:
                SmtpCmdSent: MAIL FROM:
              --sendCmdToSmtp
            --sendMailFrom
            sendRcptTo:
              sendCmdToSmtp:
                SmtpCmdSent: RCPT TO:
              --sendCmdToSmtp
            --sendRcptTo
            sendCmdToSmtp:
              SmtpCmdSent: DATA
            --sendCmdToSmtp
            readSmtpResponse:
              WindowsError: An existing connection was forcibly closed by the remote host.
              WindowsErrorCode: 0x2746
              maxToReceive: 152
              Failed to receive data on the TCP socket
              Failed to read TLS record (2)
              tlsRec_msg: 0
              msgLen: 152
              nReadNBytes: 0
              status: 0
              Failed to receive more TLS application data.
              tlsApp: Socket fatal error.
            --readSmtpResponse
          --sendWithPipelining
        --sendSmtpEmail
      --sendMimeInner
    --sendEmailInner
    Failed.
  --SendEmail
--ChilkatLog

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...