author | groucho <groucho> | 2003-04-11 14:48:19 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-11 14:48:19 (UTC) |
commit | d37f3eac6b876285eb7a03ab01194ea261458ea5 (patch) (side-by-side diff) | |
tree | 47420d872c6d298db7e26715c80cf3aebb055033 /noncore/unsupported/mailit/emailhandler.cpp | |
parent | ebf5bb083d47179918d47f083a3cc98a5ed5d2e0 (diff) | |
download | opie-d37f3eac6b876285eb7a03ab01194ea261458ea5.zip opie-d37f3eac6b876285eb7a03ab01194ea261458ea5.tar.gz opie-d37f3eac6b876285eb7a03ab01194ea261458ea5.tar.bz2 |
Lots of improvements regarding usability and stability:
- Now uses ofileselector for sending attachments (reading follows, does not crash any more)
- Uses DocLnks for attachments (when composing a message)
- Beautified the attachments dialog with doc icons
- removed a crash when sending attachments and no account was set
- smaller fixes
ToDo:
- Attachment viewer should use doclnk too
- get rid of teh save button in ofileselector
- fix the bug with GMX mail provider sending mail (user encoding wrong)
- replace the Attach and Remove buttons with a nice toolbar
- Maybe integrate attview into the mail sending window on demand
- get rid of crashes
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 @@ -403,30 +403,33 @@ int EmailHandler::parse64base(char *src, char *bufOut) { if (src[3] != '=') { bufOut[2] = (char) li[2] & (2+1); //mask out top 6 bits bufOut[2] <<= 6; z = li[3]; bufOut[2] = bufOut[2] | z; //third byte retrieved processed++; } } return processed; } -int EmailHandler::encodeMime(Email *mail) { +int EmailHandler::encodeMime(Email *mail) +{ + QString fileName, fileType, contentType, newBody, boundary; Enclosure *ePtr; QString userName = mailAccount.name; - userName += " <" + mailAccount.emailAddress + ">"; + if (userName.length()>0) //only embrace it if there is a user name + userName += " <" + mailAccount.emailAddress + ">"; //add standard headers newBody = "From: " + userName + "\r\nTo: "; for (QStringList::Iterator it = mail->recipients.begin(); it != mail->recipients.end(); ++it ) { newBody += *it + " "; } newBody += "\r\nSubject: " + mail->subject + "\r\n"; if (mail->files.count() == 0) { //just a simple mail newBody += "\r\n" + mail->body; mail->rawMail = newBody; return 0; |