muquit / mailsend

A program to send mail via SMTP from command line
Other
295 stars 68 forks source link

If Server sends multi-line 550 response, mailsend only displays one #57

Closed sanderjo closed 10 years ago

sanderjo commented 10 years ago

If Server sends multi-line 550 response, mailsend only displays one

mailsend stdout:

X-Mailer: @(#) mailsend v1.17b15 (Unix) X-Copyright: BSD. It is illegal to use this software for Spamming [C] this is my mail ...

[C] . [S] 550-5.7.1 [2001:4c38:ff00:0:20c:29ff:fe0d:d9a 12] Our system has detected Error: Expected smtp code 250, got 550

Could not send mail

So: just one line from [S]. Which seems truncated: A manual telnet smtp reveals more lines:

. 550-5.7.1 [2001:4c38:ffcccccce0d:d9a 12] Our system has detected 550-5.7.1 that this message is likely unsolicited mail. To reduce the amount of 550-5.7.1 spam sent to Gmail, this message has been blocked. Please visit 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for 550 5.7.1 more information. fl9si4995427igb.2 - gsmtp Connection closed by foreign host.

So I think it would be good if mailsend would display all the lines the Server sends.

Thanks

sanderjo commented 10 years ago

today's git version gives this:

[C] . [S] 550-5.7.1 [2001:4c3xxxxxd9a 12] Our system has detected Error: Expected smtp code 250, got 550

[S] 550-5.7.1 that this message is likely unsolicited mail. To reduce the amount of [S] 550-5.7.1 spam sent to Gmail, this message has been blocked. Please visit [S] 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for [S] 550 5.7.1 more information. kx5si9906422igb.41 - gsmtp Could not send mail

So, yes, all Server's output is displayed, but I would have expected the "Error: Expected smtp code 250, got 550" only after the last Server's 550. So:

[C] . [S] 550-5.7.1 [2001:4c3xxxxxd9a 12] Our system has detected [S] 550-5.7.1 that this message is likely unsolicited mail. To reduce the amount of [S] 550-5.7.1 spam sent to Gmail, this message has been blocked. Please visit [S] 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for [S] 550 5.7.1 more information. kx5si9906422igb.41 - gsmtp Error: Expected smtp code 250, got 550 Could not send mail

If that's possible, I would prefer that.

sanderjo commented 10 years ago

It's now really beautiful. Thank you

[C] . [S] 550-5.7.1 [2001:4c38:fccc 12] Our system has detected [S] 550-5.7.1 that this message is likely unsolicited mail. To reduce the amount of [S] 550-5.7.1 spam sent to Gmail, this message has been blocked. Please visit [S] 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for [S] 550 5.7.1 more information. fl9si16037223igb.2 - gsmtp Error: Expected smtp code 250, got 550

Could not send mail