问题
I have tried to send emails from my server using smtp.gmail.com:587 on ipv6 but I get this error:
=== Connected to smtp.gmail.com.
<** 421 4.7.0 Try again later, closing connection.
-> QUIT
*** Remote host closed connection unexpectedly.
On the server I use swaks to test this using the following command:
swaks -6 --server smtp.gmail.com:587 --from from@gmail.com --to to@gmail.com -tls -a LOGIN
But if I use the swaks on ipv4 I can send email with no problems:
swaks -4 --server smtp.gmail.com:587 --from from@gmail.com --to to@gmail.com -tls -a LOGIN
The response:
235 2.7.0 Accepted
~> MAIL FROM:<from@gmail.com>
<~ 250 2.1.0 OK gsmtp
~> RCPT TO:<to@gmail.com>
<~ 250 2.1.5 OK gsmtp
~> DATA
<~ 354 Go ahead gsmtp
~> Date: Wed, 29 Jul 2020
~> To: to@gmail.com
~> From: from@gmail.com
~> Subject: test Wed, 29 Jul 2020
~> X-Mailer: swaks v20181104.0
~> This is a test mailing
~> .
<~ 250 2.0.0 OK 1596049286 gsmtp
~> QUIT
<~ 221 2.0.0 closing connection gsmtp
来源:https://stackoverflow.com/questions/63160968/why-i-cant-send-emails-using-smtp-gmail-com587-on-ipv6