Solved

Sending Emails with C in Windows

Posted on 2004-03-29
4
251 Views
Last Modified: 2010-04-17
Hi,

I would like 2 find out how can I send emails with C in Windows.
In my program, I'm suppose to notify my user via email if error occurred.
Pls advice how can I send emails perhaps via Outlook with C.  Will b glad if can provide sample code.

Really appreciate & thks! (",)

mandy
0
Comment
Question by:mandy_less
4 Comments
 
LVL 19

Accepted Solution

by:
Melih SARICA earned 63 total points
ID: 10711517
0
 
LVL 69

Assisted Solution

by:Callandor
Callandor earned 62 total points
ID: 10714815
If you have an SMTP mail server in your network, you can use a free program like bmail to send notifications.  In your C code, just make a system call to the bmail executable:

bmail -s yoursmtpmailserver.yourcompany.com -t username@yourcompany.com -f mandy_less@yourcompany.com -a "your error message"

Either use the full path of bmail or include it in the path of executables.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question