Solved

Sending Emails with C in Windows

Posted on 2004-03-29
4
249 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This is an explanation of a simple data model to help parse a JSON feed
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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 …

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now