Connecting Tech Pros Worldwide Forums | Help | Site Map

How to send e-mail with C in Windows

Newbie
 
Join Date: Apr 2007
Posts: 1
#1: Apr 22 '07
Hello,

I am trying to send e-mail via using C code but i didn't figure out how to do it.

I saw a discussion about sending email with system function but it didn't work under Windows OP. I am using Windows XP.

Code could receive email adresses(from and to) and subject line and mail message.. That's all no attached file. But if it is easy to send an attached file that would be also ok for me.

I just need information about that sending. It seems like easy in C# but i didn't find out enough documents for C.

Thanks

Newbie
 
Join Date: Apr 2007
Posts: 18
#2: Apr 22 '07

re: How to send e-mail with C in Windows


Quote:

Originally Posted by selimer

Hello,

I am trying to send e-mail via using C code but i didn't figure out how to do it.

I saw a discussion about sending email with system function but it didn't work under Windows OP. I am using Windows XP.

Code could receive email adresses(from and to) and subject line and mail message.. That's all no attached file. But if it is easy to send an attached file that would be also ok for me.

I just need information about that sending. It seems like easy in C# but i didn't find out enough documents for C.

Thanks

As u r using Windows XP, then i think you need VC++ which comes with winsock library for doing all network programming stuff.
So try your hand on Winsock library. It is a really fun.

It is not difficult to program but off course it won't as easy in C#
sicarie's Avatar
Moderator
 
Join Date: Nov 2006
Location: USA
Posts: 3,929
#3: Apr 22 '07

re: How to send e-mail with C in Windows


I found another possibility here, look for the SendMail zip under MFC Classes.
Reply