Advertisement

Email from MFC

Started by July 18, 2000 12:50 AM
2 comments, last by SikCiv 24 years, 5 months ago
Is there a way to send an email containing an attachment over the Internet or an Intranet from a standard MFC app? Is there a library i can download? Or do i have to code it from scratch using TCP/IP etc..? Basically I need to know how to send an email from my exe via Outlook, instead of typing out the email in Outlook itself... Edited by - SikCiv on 7/18/00 12:53:58 AM

  Downloads:  ZeroOne Realm


I don''t believe there is any MFC "email" class or the like (there are internet related classes tho).

Your in luck however. MS Outlook is an automation server (just like all other Office products) and as such is programmable. Search microsofts site for "Outlook Object Model" and I am sure you will turn up some good documentation and samples.

Advertisement
It''s not supported directly with MFC, but there are plenty of ''em out there. If you can find a copy of Developing for the Internet with Winsock, it included C++ classes for several protocols, including SMTP. It worked quite well, as I worked SMTP support into a project without having to modify it as all.

Do a search for C++ SMTP classes that use Winsock on the net. You''ll find quite a few candidates. There''s a commercial one here. Developer.com has a lot of candidates, including one here.

(my byline from the Gamedev Collection series, which I co-edited) John Hattan has been working steadily in the casual game-space since the TRS-80 days and professionally since 1990. After seeing his small-format games turned down for what turned out to be Tandy's last PC release, he took them independent, eventually releasing them as several discount game-packs through a couple of publishers. The packs are actually still available on store-shelves, although you'll need a keen eye to find them nowadays. He continues to work in the casual game-space as an independent developer, largely working on games in Flash for his website, The Code Zone (www.thecodezone.com). His current scheme is to distribute his games virally on various web-portals and widget platforms. In addition, John writes weekly product reviews and blogs (over ten years old) for www.gamedev.net from his home office where he lives with his wife and daughter in their home in the woods near Lake Grapevine in Texas.

I dont actually need to email over the internet from my app, all im trying to do is send an email to outlook by just adding a new message. I know it can be done with Outlook2000 using the Outlook object module, but im using Outlook98, as do many other users, so id like to stick with Outlook 98 for now.
Im sure there is an easy way to do it? Is there a public library available, or can I do it without the use of extra libs, suing the standard set of libs available in MSVC?

My program is in C++, not VB, so obviously i need a c++ compatible lib.

If u guys dont know, is there another forum like this one but focuses on business/MFC apps?

  Downloads:  ZeroOne Realm

This topic is closed to new replies.

Advertisement