Need help sending email programmatically

R

Rostau

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
 
V

Victor Bazarov

Rostau said:
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
 
J

Jim Langston

Rostau said:
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.
 
R

Rostau

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.
 
R

Rostau

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.
 
?

=?ISO-8859-1?Q?Stefan_N=E4we?=

Rostau said:
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.SMTPClientSession.html)

HTH
Stefan
 
V

Victor Bazarov

Rostau said:
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.
 
J

Jim Langston

Rostau said:
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.
 
D

Default User

Rostau said:
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
 
N

Noah Roberts

Rostau said:
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...
 
D

Default User

Phlip said:
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
 
R

Rostau

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top