Need help sending email programmatically

Discussion in 'C++' started by Rostau, May 11, 2006.

  1. Rostau

    Rostau Guest

    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
    Rostau, May 11, 2006
    #1
    1. Advertising

  2. 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
    Victor Bazarov, May 11, 2006
    #2
    1. Advertising

  3. Rostau

    Jim Langston Guest

    "Rostau" <> wrote in message
    news:...
    > 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.
    Jim Langston, May 11, 2006
    #3
  4. Rostau

    Rostau Guest

    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.
    Rostau, May 12, 2006
    #4
  5. Rostau

    Rostau Guest

    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.
    Rostau, May 12, 2006
    #5
  6. 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.SMTPClientSession.html)

    HTH
    Stefan
    --
    Stefan Naewe
    naewe.s_AT_atlas_DOT_de
    =?ISO-8859-1?Q?Stefan_N=E4we?=, May 12, 2006
    #6
  7. Rostau

    Rostau Guest

    Looks great. Thanks a lot :)
    Rostau, May 12, 2006
    #7
  8. 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.
    Victor Bazarov, May 12, 2006
    #8
  9. Rostau

    Jim Langston Guest

    "Rostau" <> wrote in message
    news:...
    > 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.
    Jim Langston, May 12, 2006
    #9
  10. Rostau

    Default User Guest

    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
    Default User, May 12, 2006
    #10
  11. Rostau

    Phlip Guest

    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!!!
    Phlip, May 12, 2006
    #11
  12. Rostau

    Noah Roberts Guest

    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...
    Noah Roberts, May 12, 2006
    #12
  13. Rostau

    Default User Guest

    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
    Default User, May 12, 2006
    #13
  14. Rostau

    Rostau Guest

    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.
    Rostau, May 14, 2006
    #14
  15. looks like you DO LOVE feeding the trolls
    Diego Martins, May 15, 2006
    #15
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page