Diffstat (limited to 'noncore/unsupported/mailit/emailhandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/emailhandler.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp index 2144899..1be16d4 100644 --- a/noncore/unsupported/mailit/emailhandler.cpp +++ b/noncore/unsupported/mailit/emailhandler.cpp | |||
@@ -407,22 +407,25 @@ int EmailHandler::parse64base(char *src, char *bufOut) { | |||
407 | z = li[3]; | 407 | z = li[3]; |
408 | bufOut[2] = bufOut[2] | z; //third byte retrieved | 408 | bufOut[2] = bufOut[2] | z; //third byte retrieved |
409 | processed++; | 409 | processed++; |
410 | } | 410 | } |
411 | } | 411 | } |
412 | return processed; | 412 | return processed; |
413 | } | 413 | } |
414 | 414 | ||
415 | int EmailHandler::encodeMime(Email *mail) { | 415 | int EmailHandler::encodeMime(Email *mail) |
416 | { | ||
417 | |||
416 | QString fileName, fileType, contentType, newBody, boundary; | 418 | QString fileName, fileType, contentType, newBody, boundary; |
417 | Enclosure *ePtr; | 419 | Enclosure *ePtr; |
418 | 420 | ||
419 | QString userName = mailAccount.name; | 421 | QString userName = mailAccount.name; |
420 | userName += " <" + mailAccount.emailAddress + ">"; | 422 | if (userName.length()>0)//only embrace it if there is a user name |
423 | userName += " <" + mailAccount.emailAddress + ">"; | ||
421 | 424 | ||
422 | //add standard headers | 425 | //add standard headers |
423 | newBody = "From: " + userName + "\r\nTo: "; | 426 | newBody = "From: " + userName + "\r\nTo: "; |
424 | for (QStringList::Iterator it = mail->recipients.begin(); it != mail->recipients.end(); ++it ) { | 427 | for (QStringList::Iterator it = mail->recipients.begin(); it != mail->recipients.end(); ++it ) { |
425 | newBody += *it + " "; | 428 | newBody += *it + " "; |
426 | } | 429 | } |
427 | newBody += "\r\nSubject: " + mail->subject + "\r\n"; | 430 | newBody += "\r\nSubject: " + mail->subject + "\r\n"; |
428 | 431 | ||