summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emailhandler.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/mailit/emailhandler.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp13
1 files changed, 9 insertions, 4 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,7 +71,9 @@ void EmailHandler::sendMail(QList<Email> *mailList)
{
Email *currentMail;
QString temp;
- QString userName = mailAccount.name;
+ QString userName = QString::null;
+ // not supported by ALL SMTP servers in the MAIL From field
+ // userName = "\""+mailAccount.name+"\"";
userName += " <" + mailAccount.emailAddress + ">";
for (currentMail = mailList->first(); currentMail != 0;
@@ -442,10 +444,13 @@ int EmailHandler::encodeMime(Email *mail)
QString fileName, fileType, contentType, newBody, boundary;
Enclosure *ePtr;
+ QString userName;
- QString userName = mailAccount.name;
- if (userName.length()>0) //only embrace it if there is a user name
- userName += " <" + mailAccount.emailAddress + ">";
+ if ( ! mailAccount.name.isEmpty() ) {
+ userName = "\"" + mailAccount.name + "\" <" + mailAccount.emailAddress + ">";
+ } else {
+ userName = "<" + mailAccount.emailAddress + ">";
+ }
//add standard headers
newBody = "From: " + userName + "\r\nTo: ";