By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,422 Members | 1,275 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,422 IT Pros & Developers. It's quick & easy.

Need help sending email programmatically

P: n/a
Hi all

I'm writing a small app that needs to be in C++ and needs to send email
from inside the program. I can do this easily in PHP, Perl and Java,
but have no clue how to do it in C++.

Does anyone know of free code I look at that incorporates this
function? Basically, I need to send a simple email to the system
support if something goes wrong in the program. The program will be
running on Windows and I'll be compiling it under MinGW.

Any and all help is much appreciated.

Thanks

May 11 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a
Rostau wrote:
I'm writing a small app that needs to be in C++ and needs to send
email from inside the program. I can do this easily in PHP, Perl and
Java, but have no clue how to do it in C++.
Well, that's understandable. There is no way to do it in C++. You need
to use some kind of OS-specific facility.
Does anyone know of free code I look at that incorporates this
function?
Plenty. Have you ever heard of www.google.com?
Basically, I need [..]


Whatever.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
May 11 '06 #2

P: n/a
"Rostau" <ev********@ananzi.co.za> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi all

I'm writing a small app that needs to be in C++ and needs to send email
from inside the program. I can do this easily in PHP, Perl and Java,
but have no clue how to do it in C++.

Does anyone know of free code I look at that incorporates this
function? Basically, I need to send a simple email to the system
support if something goes wrong in the program. The program will be
running on Windows and I'll be compiling it under MinGW.


A few ways depending on how you want to do it. One way is to open a socket
connection to your SMTP server and send the message that way. The otherway
is to interface with some system e-mail software.

Both are rather off topic here though. Start googling for both solutions
and pick the one you want. If you have problems implementing it because
you're code isn't working, that's on topic.
May 11 '06 #3

P: n/a
Thanks for basically being a rude git. If you didn't have anything to
contribute, why did you bother posting? Techno-arrogance is for
wankers. Way to encourage people to learn things, dickhead.

May 12 '06 #4

P: n/a
Thanks for this. For the record, I have googled. I was hoping someone
had knowledge of a piece of working code that does this simple task and
was free to distribute. Google throws up a variety of libraries, most
of which seem to do far more than what I want, which is simply build
email, connect to server, send mail.

Thanks anyway.

May 12 '06 #5

P: n/a
Rostau schrieb:
Hi all

I'm writing a small app that needs to be in C++ and needs to send email
from inside the program. I can do this easily in PHP, Perl and Java,
but have no clue how to do it in C++.

Does anyone know of free code I look at that incorporates this
function? Basically, I need to send a simple email to the system
support if something goes wrong in the program. The program will be
running on Windows and I'll be compiling it under MinGW.

Any and all help is much appreciated.


Maybe this has what you need:

http://www.appinf.com/docs/poco/
(http://www.appinf.com/docs/poco/Net....ntSession.html)

HTH
Stefan
--
Stefan Naewe
naewe.s_AT_atlas_DOT_de
May 12 '06 #6

P: n/a
Looks great. Thanks a lot :-)

May 12 '06 #7

P: n/a
Rostau wrote:
Thanks for basically being a rude git. If you didn't have anything to
contribute, why did you bother posting? Techno-arrogance is for
wankers. Way to encourage people to learn things, dickhead.


You do know that your posts are archived for posterity, don't you? I
really want to congratulate you on your success for potentially screwing
your career when a prospective employer of yours reads your posts. Name
calling is for children. Way to behave on the 'net with strangers.

FOr the record, I did contribute. At least now you know that if you
misbehave, you will face unpleasantness, even if it's just in the form of
irritation after reading replies to your messages. Read the FAQ, read
the newsgroup before continuing to embarrass yourself. Learn what
topicality is and how to communicate with other people without offending
them. And meanwhile, welcome to my killfile.
May 12 '06 #8

P: n/a
"Rostau" <ev********@ananzi.co.za> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Thanks for this. For the record, I have googled. I was hoping someone
had knowledge of a piece of working code that does this simple task and
was free to distribute. Google throws up a variety of libraries, most
of which seem to do far more than what I want, which is simply build
email, connect to server, send mail.

Thanks anyway.


Try sourceforge.
May 12 '06 #9

P: n/a
Rostau wrote:
Thanks for basically being a rude git. If you didn't have anything to
contribute, why did you bother posting? Techno-arrogance is for
wankers. Way to encourage people to learn things, dickhead.


*plonk*

Brian
May 12 '06 #10

P: n/a
Default User wrote:
Rostau wrote:
Thanks for basically being a rude git. If you didn't have anything to
contribute, why did you bother posting? Techno-arrogance is for
wankers. Way to encourage people to learn things, dickhead.


*plonk*


This is why I often post "how to bounce a post". My bounces generally don't
draw flames, regardless how stupid the OP is.

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
May 12 '06 #11

P: n/a

Rostau wrote:
Thanks for this. For the record, I have googled. I was hoping someone
had knowledge of a piece of working code that does this simple task and
was free to distribute. Google throws up a variety of libraries, most
of which seem to do far more than what I want, which is simply build
email, connect to server, send mail.

Thanks anyway.


You need to read the RFC's on email protocols, of which there are quite
a few, and then read how to make a network connection and communicate
through it using the facilities provided by your target OS.

Or you could always use one of those libraries...

May 12 '06 #12

P: n/a
Phlip wrote:
Default User wrote:
Rostau wrote:
Thanks for basically being a rude git. If you didn't have anything to >> contribute, why did you bother posting? Techno-arrogance is for wankers. Way to encourage people to learn things, dickhead.


plonk


This is why I often post "how to bounce a post". My bounces generally
don't draw flames, regardless how stupid the OP is.

You're a man among men.

Brian
May 12 '06 #13

P: n/a
Your sad attempt to save face has failed. You were downright rude and
you know it, so trying to take the moral high ground isn't going to get
you anywhere. You're obviously a pathetic slob with self-esteem so low
he has to mock people who know less than he does.

May 14 '06 #14

P: n/a
looks like you DO LOVE feeding the trolls

May 15 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.