bluetiger9 / SmtpClient-for-Qt

An SMTP Client writen in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.
https://github.com/bluetiger9/SmtpClient-for-Qt/wiki
GNU Lesser General Public License v2.1
449 stars 226 forks source link

stray newline #100

Closed HughFeliks closed 2 years ago

HughFeliks commented 3 years ago

I just had an email failed with this response:

  This is an automatically generated Delivery Status Notification.      

Delivery to the following recipients failed permanently:

Reason: A message that you sent to the following recipient could not be delivered due to a permanent error. The remote server ?? responded with: jrcollins@filertel.com ??:?? This message was created automatically by mail delivery software on the server .

Reporting-MTA: dns; avasout01 [84.93.230.227] Received-From-MTA: dns; localhost [80.229.233.117] Arrival-Date: Wed, 24 Feb 2021 21:18:19 +0000

Final-recipient: rfc822; jrcollins@filertel.com Diagnostic-Code: smtp; 550 stray newline detected. see http://cr.yp.to/docs/smtplf.html

Last-attempt-Date: Wed, 24 Feb 2021 21:18:21 +0000

I've been using this Client for ages and never had this before. I have no idea how to fix it. Nobody else has ever complained!

for info: Client files copied in to a Qt 5.9 project.

bluetiger9 commented 2 years ago

This look like an error related to sending bare LF new lines (\n) to the server. The library normally sends CR LF (\r\n), but you may have \n in your content. Some email server may not like this.