From fc1fab930deffa09db08a8a7965fbe16e7836115 Mon Sep 17 00:00:00 2001 From: ionum Date: Sun, 20 Jun 2021 21:54:40 +0200 Subject: [PATCH] Omit \r\r\n Check if endline is already \r\n --- protocols/smtp.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/protocols/smtp.cc b/protocols/smtp.cc index 00f076e..3bb4385 100644 --- a/protocols/smtp.cc +++ b/protocols/smtp.cc @@ -194,6 +194,7 @@ void smtp::send_data(fdibuf& msg) docmd("DATA", 300); mystring tmp; while(msg.getline(tmp)) { + if(tmp[tmp.length()-1] == '\r') tmp = tmp.left(tmp.length()-1); if((tmp[0] == '.' && !(out << ".")) || !(out << tmp << "\r\n")) protocol_fail(ERR_MSG_WRITE, "Error sending message to remote");