Search code examples
qtimapemail-client

QT: Add e-mail capabilities (send, scan, download attachments) to a Qt App


I have a cross platform Qt application i'd like to add e-mail capabilities for. Given that the user grants his/her permission to the application and provides the e-mail/server/password information to the application, i'd like to:

  1. Programmatically send e-mails using that account
  2. Scan the inbox looking for certain e-mails i'd be interested to download (search strings inside subject lines)
  3. Be able to download attachments from e-mails i deem interesting.

Ideally, i'd like to be able to interface to popular e-mail services like GMail, Hotmail, (IMAP) so that my users have an easy configuration (e.g. "I have gmail, here's my ID/password").

Is there any Qt library that can assist in that task?


Solution

  • You may want to take a look at this

    make sure that you may need to change some stuff over there, such as:

    socket->connectToHost( "smtp.yourserver.com", 25);
    

    for the gmails (for instance) smpt server,etc...