Results 1 to 15 of 15

Thread: send an email from my Qt application

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Posts
    12
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: send an email from my Qt application

    Yes you are right. Authenticator is used for proxy authentification.
    As far as I know, noone as never try this class with a proxy ( I don't).
    This is a very particular case so I think you can comment sections about authenticator and get the class to compile.

  2. #2
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: send an email from my Qt application

    ok I did wath you say, and now I have the same problem with an other includ
    #include <QSslSocket>

    ( and may be others includ of Qt4.3 )

    ideas ?

  3. #3
    Join Date
    Oct 2007
    Posts
    12
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: send an email from my Qt application

    Yes,
    The QSslSocket aims at support ssl with SMTP
    You've got two options: recompile Qt with openssl support or delete everything about QSslSocket and use only QTcpSocket. In this case you cannot connect to SMTP servers that required SSL.

    As before, this a particular case and most SMTP servers accept non encrypted connections. I think this as nothing to do with Qt 4.3, I'm quite sure you can compile Qt with SSL
    Last edited by yonnak; 20th December 2008 at 12:24. Reason: Precision

  4. #4
    Join Date
    Dec 2007
    Location
    London
    Posts
    206
    Thanks
    40
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: send an email from my Qt application

    Alternatively, see that application:

    http://www.qt-apps.org/content/show....?content=91315

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,328
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: send an email from my Qt application

    If all you want to do is -send- an e-mail from your application, it is very easy to use QDesktopServices:

    Qt Code:
    1. QString strMailTo( "mailto:someone@someAddress.com?subject='My E-mail example'&body=" );
    2. strMailTo += "Hi! This is the body of the e-mail";
    3. bool bResult = QDesktopServices::openUrl( QUrl( strMailTo ) );
    To copy to clipboard, switch view to plain text mode 

    The QUrl constructor will convert the "strMailTo" string into a proper URL (that is, replace spaces by %20%, and so forth). The Boolean result tells you whether the call succeeded or not.

    Forget all this stuff about sockets, TCP, SMTP, and so on.

    David

  6. #6
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: send an email from my Qt application

    very thanks to all,
    Quote Originally Posted by yonnak View Post
    Yes,
    The QSslSocket aims at support ssl with SMTP
    You've got two options: recompile Qt with openssl support or delete everything about QSslSocket and use only QTcpSocket. In this case you cannot connect to SMTP servers that required SSL.

    As before, this a particular case and most SMTP servers accept non encrypted connections. I think this as nothing to do with Qt 4.3, I'm quite sure you can compile Qt with SSL
    Ok I wil see for the second option

    Quote Originally Posted by d_stranz View Post
    If all you want to do is -send- an e-mail from your application, it is very easy to use QDesktopServices:


    Qt Code:
    1. QString strMailTo( "mailto:someone@someAddress.com?subject='My E-mail example'&body=" );
    2. strMailTo += "Hi! This is the body of the e-mail";
    3. bool bResult = QDesktopServices::openUrl( QUrl( strMailTo ) );
    To copy to clipboard, switch view to plain text mode 
    I need to send an attach file .
    Last edited by omega36; 22nd December 2008 at 10:39.

  7. #7
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: send an email from my Qt application


    NoBody!

Similar Threads

  1. QSkinWindows Classes
    By kernel_panic in forum Qt-based Software
    Replies: 45
    Last Post: 20th April 2010, 12:35
  2. how to write application which retrieve email from INBOX
    By amit_pansuria in forum KDE Forum
    Replies: 2
    Last Post: 4th June 2007, 14:10
  3. send email and to annex files
    By henriquez0 in forum Qt Programming
    Replies: 8
    Last Post: 29th December 2006, 18:45
  4. Replies: 3
    Last Post: 6th February 2006, 17:41

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.