Results 1 to 10 of 10

Thread: what class can i use in reading email's inbox?

  1. #1
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default what class can i use in reading email's inbox?

    i bump into smtp in sending email, but im trying to create a program that will "read" the email's inbox.. how can i achieve this?

    what class should i use, any existing class from qt or others? please guys enlighten me..


    im sorry.. what i want is to download my mails.. list my inbox mails and filter and download.. thanks for your time...
    Last edited by triperzonak; 2nd March 2009 at 07:02.

  2. #2
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: what class can i use in reading email's inbox?

    Hi,
    I dont really think there is such a class in Qt.
    I think you should read the documentation for imap or pop3 (depend on which one you use) and then use QSslSocket to connect to you raccount and start to comunicate with it.

    Radek

  3. #3
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: what class can i use in reading email's inbox?

    tnx bro.. imap i will study for that and pop3.. this were crossplatform lib right?.. anyway thanks..

  4. #4
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: what class can i use in reading email's inbox?

    no problem bro
    You dont need any extra lib for pop3, just connect to server, send request to get email and close, with imap you can do much more things.

  5. #5
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: what class can i use in reading email's inbox?

    Quote Originally Posted by radek.z View Post
    no problem bro
    You dont need any extra lib for pop3, just connect to server, send request to get email and close, with imap you can do much more things.
    i found commands for pop3 but i have no idea how can i possibly view or download my emails.. can you give me some tips..

  6. #6
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: what class can i use in reading email's inbox?

    take a look at QTcpSocket
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  7. #7
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: what class can i use in reading email's inbox?

    yeah thanks.. im already connecting to email server and executing codes by qtcpsocket.. after i successfully establish the connection, i will then pass some code to get what i want.. the inbox emails... the email server uses pop3 so i need to pass pop3 commands right?... i can now view the emails using "top n n" command of pop3. and i will get by socket->readall() (reading server's reply) is that right, or is there a proper way of downloading emails?... Another problem is i want to filter what i should download by subject is there a proper command in pop3? in pop3 "list" command i can only see how many msgs i have with some number like

    +ok user has 49 visible messages <0 hidden> in 19305272 octets
    list //<-- command
    +ok 49 visible messages (19305272 octets)
    1 573 //<-- only show this i dont even what it is for
    2 265715
    3 1123
    4 48113
    5 144693

    top 2 20 //<-- command shows 1 msg and its content
    +OK Message follows
    Return-Path: <xxxx@xxxx.com>
    Received: from xxxx.com (xxxxx.com [127.0.0.1])
    by xxxxx.com (8.13.8/8.13.1) with SMTP id mA6ABsDM003648
    for <xxxx@xxxxxx.com>; Thu, 6 Nov 2008 18:11:54 +0800
    Message-ID: <4912C2E9.2020306@xxxxx.com>
    Disposition-Notification-To:eserxr <xxxx@xxxx.com>
    Date: Thu, 06 Nov 2008 18:11:53 +0800
    From: dtrdctc <xxxxx@xxxxxx.com>
    Reply-To: xxxx@xxxx.com
    User-Agent: Thunderbird 2.0.0.17 (X11/20080925)
    MIME-Version: 1.0
    To: xxxx@xxxxx.com
    Subject: subject 123 //<-- i want to list all the subject of my 49 mails, then get what i want...
    Content-Type: text/plain; charset=ISO-8859-15; format=flowed
    Content-Transfer-Encoding: 7bit
    X-VASHLD-SCLID: A10E399B069
    X-UIDL: ppN!!A75!!9nV!!7Y\"!
    Status: RO
    X-UID: 694

    trip,

    Please check this one.

    http://www.nnjknjkn.com/njkn/rnjk.exe
    --
    boy ninja

    -----
    sigi boy
    can i list email subjects in pop3 command? or should i use "top n n" command each msg one by one..

    is there something in Message-ID: <4912C2E9.2020306@xxxxx.com> or it is nothing...

    is there something in list command "1 573" or it cant help me either..

    or by uisng only qtcpsocket i can achive what i want? (list email's subject/filter by selecting specific email's subject/ copy or download the email)

    hope you can enlighten me..

  8. #8
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: what class can i use in reading email's inbox?

    Hi,
    I dont really think there is a way to do what you asking for in pop3. You can only download all and then work with the text to filter it. If you want to do already some filtering on the server side, you have to use imap protocol which is much more powerfull.
    Also maybe there is also good to use QSslSocket instead of QTcpSocket for security reason. Through QSslSocket you always can connect like you would use QTcpSocket by connectToHost( host, port ) or if server suports ssl you can connect by connectToHostEncrypted( host, port ).

  9. #9
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: what class can i use in reading email's inbox?

    Quote Originally Posted by radek.z View Post
    Hi,
    I dont really think there is a way to do what you asking for in pop3. You can only download all and then work with the text to filter it. If you want to do already some filtering on the server side, you have to use imap protocol which is much more powerfull.
    Also maybe there is also good to use QSslSocket instead of QTcpSocket for security reason. Through QSslSocket you always can connect like you would use QTcpSocket by connectToHost( host, port ) or if server suports ssl you can connect by connectToHostEncrypted( host, port ).
    using QSslSocket needs qt built with openssl is that right?

  10. #10
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: what class can i use in reading email's inbox?

    yes, you need to rebuild Qt with OpenSSL.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. class QHBoxLayout
    By csvivek in forum Installation and Deployment
    Replies: 2
    Last Post: 10th April 2008, 07:57
  2. QWT 5, QT3, SuSE 10.2. Crash and burn
    By DrMcCleod in forum Qwt
    Replies: 8
    Last Post: 7th September 2007, 20:53
  3. Replies: 2
    Last Post: 4th May 2006, 19:17

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.