Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 19:07

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: C Help
PostPosted: 25 Jun 2009 22:47 

Joined: 25 Jun 2009 22:34
Posts: 11
Can anybody give me an example on how to send emails from C using a smtp?
I've worked to a program, and now i'm thinking to add this function to it.
So, if someone can give me an example or some suggestions, i would be grateful.


Top
 Profile  
 
 
 Post subject: Re: C Help
PostPosted: 25 Jun 2009 22:55 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
well, despite your skills a smtp client (although minimal) is not the easiest thing of the world.
anyway the only resources you need to watch are:
- handling of the sockets (obviously)
- smtp rfc http://www.ietf.org/rfc/rfc2821.txt
- remember that the smtp server to contact is not your but the one of the destination mail retrieved through the MX dns record

if you want to avoid all these troubles search on internet a free smtp library which does the job, it could be suggested in this case


Top
 Profile  
 
 Post subject: Re: C Help
PostPosted: 25 Jun 2009 23:42 

Joined: 25 Jun 2009 22:34
Posts: 11
Is not so easy..I found a smtp library or something like that, but i have no ideea how to use it. For example i've found something here: vmime.org, i've looked little over the source, but i can't understand too much.
I was thinking that someone has so far implemented such a program ..


Top
 Profile  
 
 Post subject: Re: C Help
PostPosted: 25 Jun 2009 23:54 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
that vmime seems just what you need, you need first to compile it with make (job for mingw/gcc) and then following the examples or the manual.

instead if you want to see a basic and jurassic (come on it was the 2002 when I just learnt C!) mini example in C take a look here: http://aluigi.org/poc/popcorn.zip


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: