New line characters changed from \n to \r\n.
This commit is contained in:
parent
d4020ab70a
commit
871a1f5daa
@ -35,7 +35,7 @@ MimeAttachment::~MimeAttachment()
|
||||
|
||||
void MimeAttachment::prepare()
|
||||
{
|
||||
this->header += "Content-disposition: attachment\n";
|
||||
this->header += "Content-disposition: attachment\r\n";
|
||||
|
||||
/* !!! IMPORTANT !!! */
|
||||
MimeFile::prepare();
|
||||
|
@ -38,7 +38,7 @@ MimeInlineFile::~MimeInlineFile()
|
||||
|
||||
void MimeInlineFile::prepare()
|
||||
{
|
||||
this->header += "Content-Disposition: inline\n";
|
||||
this->header += "Content-Disposition: inline\r\n";
|
||||
|
||||
/* !!! IMPORTANT !!! */
|
||||
MimeFile::prepare();
|
||||
|
@ -107,7 +107,7 @@ QString MimeMessage::toString()
|
||||
mime += " " + sender->getName();
|
||||
}
|
||||
}
|
||||
mime += " <" + sender->getAddress() + ">\n";
|
||||
mime += " <" + sender->getAddress() + ">\r\n";
|
||||
/* ---------------------------------- */
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ QString MimeMessage::toString()
|
||||
mime += " " + (*it)->getName();
|
||||
}
|
||||
}
|
||||
mime += " <" + (*it)->getAddress() + ">\n";
|
||||
mime += " <" + (*it)->getAddress() + ">\r\n";
|
||||
}
|
||||
/* ---------------------------------- */
|
||||
|
||||
@ -151,12 +151,12 @@ QString MimeMessage::toString()
|
||||
}
|
||||
/* ---------------------------------- */
|
||||
|
||||
mime += "\n";
|
||||
mime += "\r\n";
|
||||
|
||||
QString boundary = "----MIME-part-boundary=" + QByteArray().append(QDateTime::currentDateTime().toString()).toBase64() + "-end";
|
||||
|
||||
mime += "MIME-Version: 1.0\n";
|
||||
mime += "Content-type: multipart/mixed; boundary=\"" + boundary + "\"\n\n";
|
||||
mime += "MIME-Version: 1.0\r\n";
|
||||
mime += "Content-type: multipart/mixed; boundary=\"" + boundary + "\"\r\n\r\n";
|
||||
|
||||
/* ====== END OF MIME HEADER ======== */
|
||||
|
||||
@ -166,9 +166,9 @@ QString MimeMessage::toString()
|
||||
|
||||
QList<MimePart*>::iterator i;
|
||||
for (i = parts.begin(); i != parts.end(); ++i)
|
||||
mime += boundary + "\n" + (*i)->toString();
|
||||
mime += boundary + "\r\n" + (*i)->toString();
|
||||
|
||||
mime += boundary + "--\n";
|
||||
mime += boundary + "--\r\n";
|
||||
|
||||
/* ====== END OF MIME BODY ========= */
|
||||
|
||||
|
@ -143,7 +143,7 @@ void MimePart::prepare()
|
||||
if (cCharset != "")
|
||||
mimeString.append("; charset=").append(cCharset);
|
||||
|
||||
mimeString.append("\n");
|
||||
mimeString.append("\r\n");
|
||||
/* ------------ */
|
||||
|
||||
/* Content-Transfer-Encoding */
|
||||
@ -151,29 +151,29 @@ void MimePart::prepare()
|
||||
switch (cEncoding)
|
||||
{
|
||||
case _7Bit:
|
||||
mimeString.append("7bit\n");
|
||||
mimeString.append("7bit\r\n");
|
||||
break;
|
||||
case _8Bit:
|
||||
mimeString.append("8bit\n");
|
||||
mimeString.append("8bit\r\n");
|
||||
break;
|
||||
case Base64:
|
||||
mimeString.append("base64\n");
|
||||
mimeString.append("base64\r\n");
|
||||
break;
|
||||
case QuotedPrintable:
|
||||
mimeString.append("quoted-printable\n");
|
||||
mimeString.append("quoted-printable\r\n");
|
||||
break;
|
||||
}
|
||||
/* ------------------------ */
|
||||
|
||||
/* Content-Id */
|
||||
if (cId != NULL)
|
||||
mimeString.append("Content-ID: <").append(cId).append(">\n");
|
||||
mimeString.append("Content-ID: <").append(cId).append(">\r\n");
|
||||
/* ---------- */
|
||||
|
||||
|
||||
/* ------------------------- */
|
||||
|
||||
mimeString.append(header).append("\n");
|
||||
mimeString.append(header).append("\r\n");
|
||||
|
||||
/* === End of Header Prepare === */
|
||||
|
||||
@ -193,7 +193,7 @@ void MimePart::prepare()
|
||||
mimeString.append(QuotedPrintable::encode(content));
|
||||
break;
|
||||
}
|
||||
mimeString.append("\n");
|
||||
mimeString.append("\r\n");
|
||||
/* === End of Content Encoding === */
|
||||
|
||||
prepared = true;
|
||||
|
@ -272,7 +272,7 @@ bool SmtpClient::sendMail(MimeMessage& email)
|
||||
|
||||
sendMessage(email.toString());
|
||||
|
||||
// Send \n.\n to end the mail data
|
||||
// Send \r\n.\r\n to end the mail data
|
||||
sendMessage(".");
|
||||
|
||||
waitForResponse();
|
||||
|
Loading…
Reference in New Issue
Block a user