Thread: Sending a email using c++

  1. #1
    Registered User
    Join Date
    Oct 2003

    Smile Sending a email using c++

    I've developed a little program which I wanted to add a little feature to.

    I want allow users to report to me a FQ / bug or user comments directly form the program.

    I want these reports to be sent to me via email.

    I have access to an SMTP mail server but I don't know how to send an email using c++.

    Ideally I want to be able to do this without using additional dll's or some external services.

    I was wondering whether you have a working sample or a test program where I can just change the from-, to- and SMTP server field.

    I only need to send a subject and body part. I don't need to send an attachment.

    Can you help me?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Well, if you know how to Telnet into a SMTP server and send an email, and you know how to program with sockets, then you're half way there.


  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User CompiledMonkey's Avatar
    Join Date
    Feb 2002
    Richmond, VA
    All that to send an email? Sad...

  5. #5
    Registered User
    Join Date
    Jun 2003
    Doesn't matter if you have access to an SMTP server or not, the question is - do the people using your software have access to your SMTP server? Most of the time this will be "No", as otherwise it'll be used as a spam relay, so providers close them off to all by trusted people (eg. there customers).

    Why use use the Windows documented interface, and let that take care of it? Your email will then be sent through whatever SMTP the user has setup for there normal mail. (Assuming your coding under windows of course).

    CompiledMonkey: The spec may seem large and complex, but only 3 simple commands are required to actually send an email, and the text interface makes it really useful when you need to send a quick email without having access to an email client (or don't have time to (re)configure one)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Spam Filters. ISP based email is dying.
    By Mario F. in forum A Brief History of
    Replies: 14
    Last Post: 03-05-2008, 12:05 PM
  2. Sending Email - Using System.Net.Mail
    By b4ip in forum C# Programming
    Replies: 1
    Last Post: 06-01-2007, 12:34 AM
  3. Sending Email via C++?
    By Monte in forum C++ Programming
    Replies: 0
    Last Post: 07-30-2002, 01:14 PM
  4. sending strings from program to email
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 04-09-2002, 06:23 PM
  5. sending email from (C++)exe file through ASP
    By priya in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2002, 10:14 AM