go-gomail / gomail

The best way to send emails in Go.
MIT License
4.3k stars 570 forks source link

How to track the low level raw SMTP log? #143

Open ousiax opened 4 years ago

ousiax commented 4 years ago

How to track the low raw SMTP log as below to debug?

Connected to smtps://smtp.foo.com:465/
S: 220 dmz-front2.mail.foo.com ESMTP ready
C: EHLO [10.100.40.55]
S: 250-dmz-front2.mail.foo.com
S: 250 AUTH PLAIN LOGIN
C: AUTH PLAIN [base64 user+pass]
S: 235 2.0.0 OK
C: MAIL FROM:<from@foo.com>
S: 250 2.1.0 Ok
C: RCPT TO:<to@bar.com>
S: 250 2.1.5 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: csmbp1@foo.com
C: To: to@bar.com
C: Subject: [test]
C: Date: Fri, 18 Oct 2019 11:33:35 +0800
C: MIME-Version: 1.0
C: Content-Type: text/plain; charset=utf-8
C: Content-Transfer-Encoding: base64
C: 
C: [some body]
C: .
S: 250 2.0.0 Ok: queued as ,,,,,,,,
xhit commented 4 years ago

This project is unmaintained, see #104 and #108

But I find your request interesting, I will investigate to apply to my package go-simple-mail