CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2002
    Posts
    1,798

    Is there a straightforward way to use Windows Sockets to send email?

    I have struggled to send email from my MFC applications using severl methods:

    1) http via my server - works but limited
    2) M$ Outlook automation - works but not easily interchangeable between machines
    3) Windows Sockets - available information simply too complicated
    4) Purchase an ActiveX control - I hate black box solutions and am too cheap

    I have looked at P. J. Naughter's class
    CPJNSMTPConnection v2.99
    An MFC class to encapsulate the SMTP protocol
    http://www.naughter.com/smtp.html

    This approach requires the implementation of OpenSSL which turns out to be nothing short of a nightmare to install (so I never got it to run).

    I am looking for an example of an application that utilizes SMTP via Windows sockets api. I have no idea if such is possible and have some serious doubts because I have not ever found such an example after years of searching.

    Would appreciate any help.
    mpliam

  2. #2
    Join Date
    May 2004
    Location
    45,000FT Above Nevada
    Posts
    1,539

    Re: Is there a straightforward way to use Windows Sockets to send email?

    Check out the SMTP/POP3/IMAP email component from
    http://www.marshallsoft.com/

    I have used this for years...easy to use and very reliable.
    Jim
    ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII

    "The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.

    "Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.

  3. #3
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: Is there a straightforward way to use Windows Sockets to send email?

    sending mail to an SMTP server is "essentially easy", in so far as your SMTP server is on your own network and you have free access to it.
    A simple socket implementation can be a matter of a hundred lines of code or so.

    Things become difficult as soon as you need to worry about such things like authentication, encryption, sending attachments, sending something other than plain text mail (such as sending HTML mail), mail tracking, ...

    That's why there are several "black box" solutions for sending email to an SMTP server.
    I personally have good experiences with the one offered by Chilkat http://www.chilkatsoft.com/

    If you're cheap. Then you could have a look at blat
    http://www.blat.net/
    and either use the commandline tool as is, or figure out how to integrate the sourcecode into your own project.

  4. #4
    Join Date
    May 2002
    Posts
    1,798

    Re: Is there a straightforward way to use Windows Sockets to send email?

    After spending 15 minutes or so on the Marshall site, I am still unable to find a price list. I do not trust organizations that do not make their product pricing clear from the outset. Nor am I looking to waste my time trying some expensive piece of software that will cease to function after 30 days.

    Any idea what the email i/o costs?
    mpliam

  5. #5
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Is there a straightforward way to use Windows Sockets to send email?

    Quote Originally Posted by Mike Pliam View Post
    After spending 15 minutes or so on the Marshall site, I am still unable to find a price list.
    I wouldn't say they're really hiding their price tag ($115 for a one developer license). It's at the bottom of SMTP/POP3/IMAP Email Component Library, the second link on their home page. It took me at most a few minutes to find it; probably it's rather been some seconds.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  6. #6
    Join Date
    May 2004
    Location
    45,000FT Above Nevada
    Posts
    1,539

    Re: Is there a straightforward way to use Windows Sockets to send email?

    Name:  SMTP_Price.jpg
Views: 656
Size:  95.2 KB

    Good samples will get you up and running in less time than a cup of coffee..
    Jim
    ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII

    "The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.

    "Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.

  7. #7
    Join Date
    May 2002
    Posts
    1,798

    Re: Is there a straightforward way to use Windows Sockets to send email?

    Thanks. So much print on that page I missed it. Seems like it might be worth it. I'm gonna check it out.
    mpliam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured