summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emailhandler.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mailit/emailhandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index 5b8bda1..06e978d 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -71,8 +71,10 @@ void EmailHandler::sendMail(QList<Email> *mailList)
71{ 71{
72 Email *currentMail; 72 Email *currentMail;
73 QString temp; 73 QString temp;
74 QString userName = mailAccount.name; 74 QString userName = QString::null;
75 userName += " <" + mailAccount.emailAddress + ">"; 75 // not supported by ALL SMTP servers in the MAIL From field
76 // userName = "\""+mailAccount.name+"\"";
77 userName += "<" + mailAccount.emailAddress + ">";
76 78
77 for (currentMail = mailList->first(); currentMail != 0; 79 for (currentMail = mailList->first(); currentMail != 0;
78 currentMail = mailList->next()) { 80 currentMail = mailList->next()) {
@@ -442,10 +444,13 @@ int EmailHandler::encodeMime(Email *mail)
442 444
443 QString fileName, fileType, contentType, newBody, boundary; 445 QString fileName, fileType, contentType, newBody, boundary;
444 Enclosure *ePtr; 446 Enclosure *ePtr;
447 QString userName;
445 448
446 QString userName = mailAccount.name; 449 if ( ! mailAccount.name.isEmpty() ) {
447 if (userName.length()>0) //only embrace it if there is a user name 450 userName = "\"" + mailAccount.name + "\" <" + mailAccount.emailAddress + ">";
448 userName += " <" + mailAccount.emailAddress + ">"; 451 } else {
452 userName = "<" + mailAccount.emailAddress + ">";
453 }
449 454
450 //add standard headers 455 //add standard headers
451 newBody = "From: " + userName + "\r\nTo: "; 456 newBody = "From: " + userName + "\r\nTo: ";