[TriLUG] OT: C++ question

Owen Berry oberry at trilug.org
Mon Oct 31 16:59:16 EST 2005


Some learning resources:

  http://www.faqs.org/rfcs/rfc821.html
  man 2 socket
  http://www.google.com/search?q=c+sockets

The fastest solution would probably be to call a command line mail
program via exec, as mentioned already.

Command line parameters:

  man 3 getopt

Owen

On Mon, Oct 31, 2005 at 12:44:08PM -0500, Mark Freeze wrote:
> Can someone show me how to send an email from within a c++ program? Or at
> least point me in the direction of a good learning resource?
>  I am writing some code to process files received from customers. The code
> parses text files that are received through ftp. What I want to do is after
> the program has finished its work, send an email to a list of predefined
> users letting them know the results of the parsing. Something like "File
> {filename_variable} was processed with {quantity_variable} records and
> {error_quantity_variable} errors." Nothing fancy... Just something to let
> them know the file was received and a few details of the processing.
>  I am using the g++ compiler on breezy ubuntu if it matters about libraries,
> dependencies, etc...
>  Thanks,
> Mark.
>  ( My next post will probably be regarding passing command line parameters
> to the program if anyone wants to go ahead and throw me a bone on this while
> I have your attention. ;-> )



More information about the TriLUG mailing list