I'm writing a program in C++ who needs to send a file using e-Mail
(SMTP). In another words, I need a code, in C++ to send a email with
attachment.
I'm programming for Win32 with DevC++. I had search in web but I can't
find something realy good.
Please, where can I find an OpenSource solution to help me?
Thank you.
Cristiano
Not here. Do another, a more thorough, search on the web. That's where
everything is nowadays.
If you have a C++ language question, you're welcome to ask it any time,
and we're happy to help. But C++ language has no means to "send a file
using e-Mail".
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Mr. V,
thank you for your answer. Can you sugest another group to do the same
question?
Thank you.
Cristiano
If somebody knows about those libraries (or whether there exists any),
it would *probably* be folks who write Web scripts/programs. Based on
that supposition, try 'comp.infosystems.www.authoring.cgi', or the
newsgroup dedicated to your OS or your compiler, sometimes networking
library includes some functionality for using such protocols like HTTP,
FTP, SMTP, etc.
Consider trying out the Poco library, <url:
http://pocoproject.org/docs/Poco.Net.MailIOS.html>.
Disclaimer 1: Haven't used, but should work.
Disclaimer 2: Someone Else(TM) reported in this group problems with using Poco
with MinGW g++, but someone associated with Poco reported in clc++m that latest
version is very MinGW g++ friendly and should work without problems.
Cheers & hth.,
- Alf
--
Due to hosting requirements I need visits to <url: http://alfps.izfree.com/>.
No ads, and there is some C++ stuff! :-) Just going there is good. Linking
to it is even better! Thanks in advance!
As other have informed you, there is no "built-in" support for Sending
email" in C++. However, many mail user agent or mail server are
written in C++ so you could implement it yourself or use a third party
library that would do the groundwork for you.
The send email, you will need SMTP capability.
To send an attachment, you probably should use MIME.
Both of these are stadards that are defined in RFCs available on the
net. There are several libraries that implement support for these in
C++.
The other alternative, if performance is not essential and you are
only going to send emails occasionally would be to do a system() call
and simply call a third party command line driven mail application.
That could save you an awful lot of work.
Yannikc
Look at here, http://www.codeproject.com/KB/IP/CSmtp.aspx