views:

182

answers:

4

Hello all,

I am needing to implement email notifications for a C++ project. Basically a user provides all the relevant information for their email account and on certain events this component would fire off an email. Ideally I would like to find a small cross platform open source command line project that I can exec from within my project and parse the output. Something like blat but it would also support SSL connections and can be used in both Windows(XP and 2003) and Linux (Ubuntu 6.06 and 8.04)

I could also use a library if it were simple enough and licensed under a commercial friendly license, but would be open to hearing all suggestions.

Thank you very much in advance for any recommendations

A: 

(A) One option is to use XMail:

http://www.xmailserver.org/

The readme file has instructions of how to build it in Linux and Windows:

http://www.xmailserver.org/Readme.html

If you look at the forums:

http://xmailforum.homelinux.net/

or do some Google searches you should be able to find more information on how to use it.


(B) Another, possibly easier option, would be to just make your application connect to and use an external SMTP server to send your notifications.

marzagao
A: 

To compose the email libmime (http://www.mozilla.org/mailnews/arch/libmime-description.html) can be helpful.

To send the mail libsmtp (http://libsmtp.berlios.de/) can be used.

lothar
There is also libvmime. It is a free mail library for C++ (http://www.vmime.org/) and can be used to send mail.
error.exit
A: 

All the protocol and SSL code for my email client is available in Lgi: http://www.memecode.com/lgi.php

It's LGPL, so you could use it as a DLL/SO. However it's not packaged ready to use binaries, you'd have to build it yourself and write some glue using the SMTP and MIME code. The SSL sockets stuff uses OpenSSL and works on both Linux and Windows.

fret
A: 

I ended up using the Perl script sendEmail. A windows binary was available and building a new binary after modifying the Perl script was not too hard to do at all. The script also had no issues running in the LTE Ubuntu environments after the required Debian packages were installed.

snctln