Results 1 to 13 of 13

Thread: send mail from qt app problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    4

    Thumbs up Re: send mail from qt app problem

    Quote Originally Posted by wysota View Post
    There needs to be an empty line between the last header ("Subject" in your case) and first line of the body of the message.
    Excellent! Here are the results. I tried:
    Qt Code:
    1. sMessage.append("Subject: " + subject + "\n");
    2. sMessage.append("\r\n" + body);
    To copy to clipboard, switch view to plain text mode 

    which yielded body text and I tried:

    Qt Code:
    1. sMessage.append("Subject: " + subject + "\r\n");
    2. sMessage.append(body);
    To copy to clipboard, switch view to plain text mode 

    which also yielded body text. It seems that the "\r" is missing from all of the code snippets in the thread. Thank you! Btw, I am also getting:

    X-UIDL: 576795945
    X-IMail-ThreadID: b5a1038d0000ddec

    appended to the end of my body text. What is that?

    Please don't do that. We can see your message very well.
    Yes sir.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: send mail from qt app problem

    The \r are not missing at all, they are implemented near the end:
    Qt Code:
    1. sMessage.replace( QString::fromLatin1( "\n" ), QString::fromLatin1( "\r\n" ) );
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Very strange socket programming problem
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2008, 13:05
  2. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 10:12
  3. sending encrypted data via mail using smtp
    By vermarajeev in forum General Programming
    Replies: 20
    Last Post: 14th August 2007, 20:47
  4. how to read Email from INBOX
    By amit_pansuria in forum Qt Programming
    Replies: 22
    Last Post: 7th June 2007, 07:40
  5. Replies: 16
    Last Post: 7th March 2006, 16:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.