Discussion How to open e-mail(say gmail) in mfc

  • Tuesday, February 28, 2012 12:50 PM
     
     

    Hi

    How do i open my gmail programatically in mfc, so that i can open, send mail and recieve athentication if the mail has been delivered or not. I am using vs6.0(vc++, mfc) as my development envirionment  

    Thanks and regards

    Kencen

All Replies

  • Tuesday, February 28, 2012 1:41 PM
     
     

    Here are a few samples on how to hadle emails:

    http://www.codeproject.com/KB/IP/#Email+%26+SMTP

    But to be honest, why not using a free mail client like Thinderbird. Btw. Your IDE is very only and not really recommended for usage at current Windows Versions like Vista and 7.

  • Wednesday, February 29, 2012 5:40 AM
     
     

    Hi Bordon,

    thanks for the reply, i am not aware of thinderbird can u please give some more explanation or samples for my better understanding. I am using windows xp as os

    Thanks and regards

    kencen

  • Wednesday, February 29, 2012 11:28 AM
     
     

    Thunderbird is free email, news client from mozilla foundation. You can download it from http://www.mozilla.org/en-US/thunderbird/.

    I think, since you asked about developing a tool having functionality of a mail client, Bordon suggest you a free, open-source mail client .

  • Thursday, March 01, 2012 1:52 AM
     
     
    You need a smtp library that supports SSL (if you want password security), VC doesn't have one. Take a look at a previous thread at http://social.msdn.microsoft.com/forums/en-us/vcgeneral/thread/A2D8E35D-7172-4F96-9D76-BB2E15B9A166 for existing suggestions.


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP


  • Monday, March 05, 2012 11:17 AM
     
     

    Hi

    I tried all the methods sent in the above links, also i worked withe demo project provided by codeguru and codeproject, but everywhere it fails to open the connection for gmail(smtp.gmail.com) is there any prior setting that has to be done for opening the gmail through smtp.

    Also i want to know how the program athenticates for username and password of my gmail address in the links given below

    http://www.codeproject.com/Articles/623/CFastSmtp-Fast-and-easy-SMTP-class 

    http://www.codeguru.com/Cpp/I-N/internet/email/article.php/c3469

    In simple words i am unable to understand how will a gmail open without username and password.

    Also, is there a way to have a simple method like i want a dialog box,

    1)enter gmail.com in a textbox

    2)username, password, subject and message body in diffrent textboxes

    3)click on send button and the mail gets sent.

    Please do suggest some ideas on the above

    Thanks and regards

    kencen

  • Monday, March 05, 2012 12:36 PM
     
     

    Hi

    I tried all the methods sent in the above links, also i worked withe demo project provided by codeguru and codeproject, but everywhere it fails to open the connection for gmail(smtp.gmail.com) is there any prior setting that has to be done for opening the gmail through smtp.

    Also i want to know how the program athenticates for username and password of my gmail address in the links given below

    http://www.codeproject.com/Articles/623/CFastSmtp-Fast-and-easy-SMTP-class 

    http://www.codeguru.com/Cpp/I-N/internet/email/article.php/c3469

    In simple words i am unable to understand how will a gmail open without username and password.

    Also, is there a way to have a simple method like i want a dialog box,

    1)enter gmail.com in a textbox

    2)username, password, subject and message body in diffrent textboxes

    3)click on send button and the mail gets sent.

    Please do suggest some ideas on the above

    Thanks and regards

    kencen

    What i can advice you about Codeproject.com samples - always read Comments and Discussion section at the bottom of the page. It can say you a lot about the quality of the code and its age (last but not least if you have to recompile it with new compilers). Seems that the code proposed ("Fast and easy SMTP class") did not work long ago.

    This sample  "CSMTPConnection v1.36" (http://www.codeproject.com/Articles/410/CSMTPConnection-v1-36) though from 2000-s, but from trusted source i used myself long time ago.  Although, i did not test it nowadays and can not say if it connects to Web SMTP servers (actually, i doubt that). But it presents raw and working SMTP protocol implementation.