Qt World Summit: Submit your Presentation

How to check and get notified when receive a specific email?

  • Hello. I would like to write a Qt program which checks and notifies when I get a specific email. I have checked some network examples on Qt document but can't seem to find what I need. Perhaps I missed something. Could anyone point me out where to start? Or are there any examples?

  • Lifetime Qt Champion

    maybe this can be good start
    If you need more , I would go look for a pop3 library to use.
    Writing an email client from scratch is huge task. :)

  • Lifetime Qt Champion


    Can you explain your use case a bit more ? Like @mrjj wrote writing a full blown client is not a simple task.

  • @mrjj Thank you for your suggestion. I will check that out.


    Can you explain your use case a bit more ?

    I have this Qt program to track an object which have a specific pattern of movement. From time to time, could be daily, I will get an email if that object needs to be relocated in order to avoid a collision. I would like to get a notification shown in my program when I get that specific email among all other mails.

    I think I should first be able login to an email, check for specific word (of sender or subject) and once I find that word, I tell the program to show notify me.

    I have looked around and found that QSslSocket might be useful for logging in to gmail? Then I can use QDialog to show a notification?

    All suggestions are welcome. Thank you.

  • Lifetime Qt Champion

    So you would need some sort of imap client to go through your emails ?

  • Hello,
    So I found some email examples from the link @mrjj suggested which uses QXmlStreamReader along with Atom system (https://developers.google.com/gmail/gmail_inbox_feed). Then I matched the parameter eg. author name I got from Xml file with a specific sender name and voilĂ ! Thank you.

Log in to reply