Results 1 to 7 of 7

Thread: how do i send message by ÙŽ QxtSmtp ??

  1. #1
    Join Date
    Jul 2010
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default how do i send message by ÙŽ QxtSmtp ??

    hello...
    i want to send message by libQxt but i dont know,i need to example . please help me.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how do i send message by ÙŽ QxtSmtp ??

    Construct the mail message, optionally set the user and password, connect to smtp server, send the message and disconnect.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2010
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how do i send message by ÙŽ QxtSmtp ??

    thank's
    for example if i want to send mail from xxxxxx@xxxxxx.xxx to xxxxxx@gmail.com how i can do that??

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how do i send message by ÙŽ QxtSmtp ??

    You go to http://doc.libqxt.org/tip/qxtsmtp.html and read the documentation of the QxtSmtp class and find the methods names matching the directions I gave you in the previous post and use them.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    alabdaly (12th July 2010)

  6. #5
    Join Date
    Jul 2010
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how do i send message by ÙŽ QxtSmtp ??

    Qt Code:
    1. Mail->setSender(From->text());
    2. Mail->setSubject(Subject->text());
    3. Mail->setBody(message->toPlainText());
    4. Mail->addRecipient("mohammd.lbdl@gmail.com");
    5. QHash<QString,QString> headers;
    6. headers.insert("MIME-Version","1.0");
    7. headers.insert("Content-type","text/html; charset=utf-8");
    8. headers.insert("from","al-mhawer.com");
    9. Mail->setExtraHeaders(headers);
    10. smtp->connectToHost("gmail.com");
    11. smtp->send(*Mail);
    To copy to clipboard, switch view to plain text mode 
    this code is work but not send mail why ??

  7. #6
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: how do i send message by ÙŽ QxtSmtp ??

    Your host is wrong.
    Go to the google gmail help pages and find what their smtp server address is.

  8. The following user says thank you to tbscope for this useful post:

    alabdaly (12th July 2010)

  9. #7
    Join Date
    Jul 2010
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how do i send message by ÙŽ QxtSmtp ??

    i succeeded ,thank tbscope and thank wysota .

Similar Threads

  1. is there any api can send signal/message to other application
    By guchangyuan in forum Qt Programming
    Replies: 7
    Last Post: 27th July 2009, 09:04
  2. Segmentation fault when try to send message
    By brevleq in forum Qt Programming
    Replies: 5
    Last Post: 7th January 2009, 01:10
  3. I need to send a message to parent dialog
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2008, 11:16
  4. Send TCP message
    By ^NyAw^ in forum Qt Programming
    Replies: 2
    Last Post: 5th June 2008, 09:33
  5. How to send message to Desktop Widget
    By shyam prasad in forum Qt Programming
    Replies: 18
    Last Post: 18th April 2007, 11:00

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.