Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to send an e-Mail with attachment?

9 views
Skip to first unread message

Cristiano

unread,
Mar 26, 2009, 3:24:31 PM3/26/09
to
Please,

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

Victor Bazarov

unread,
Mar 26, 2009, 3:46:28 PM3/26/09
to

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

Cristiano

unread,
Mar 26, 2009, 3:51:42 PM3/26/09
to

Mr. V,

thank you for your answer. Can you sugest another group to do the same
question?

Thank you.

Cristiano

Victor Bazarov

unread,
Mar 26, 2009, 4:08:08 PM3/26/09
to

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.

Alf P. Steinbach

unread,
Mar 26, 2009, 4:31:35 PM3/26/09
to
* Cristiano:

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!

Yannick Tremblay

unread,
Mar 27, 2009, 8:26:54 AM3/27/09
to
In article <b3015d2f-3ef8-4873...@j38g2000yqa.googlegroups.com>,

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


Juice

unread,
Mar 27, 2009, 11:03:48 AM3/27/09
to

A little bit of googling revealed this:
http://sourceforge.net/projects/vmime

Regards,
Ivan

Bo Schwarzstein

unread,
Mar 27, 2009, 10:30:41 PM3/27/09
to
0 new messages