Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help needed to send email from simple C program

Status
Not open for further replies.

E-design

Advanced Member level 5
Joined
Jun 1, 2002
Messages
2,014
Helped
507
Reputation
1,016
Reaction score
408
Trophy points
1,363
Activity points
14,193
sending email from a c program

I need to send a message as soon as a simple C program produced a wanted result. I need to include the value of a variable in the email message. I am not sure how to go about this. Please help.

I found this on Google but it won't compile with an error about MailMessage mail and there's no method to attach a value in the message.

Code:
// create mail message object
MailMessage mail = new MailMessage();
mail.From = " ";           // put the from address here
mail.To = " ";             // put to address here
mail.Subject = " ";        // put subject here	
mail.Body = " ";           // put body of email here
SmtpMail.SmtpServer = " "; // put smtp server you will use here 
// and then send the mail
SmtpMail.Send(mail);
 

It will be working with Windows XP
 

the code you have presented is with C++,i guess.
Did you refer some network books for C codes...
 

I have been looking for days for C code everywhere on the net. All I want is someone to provide a sample of code or to tell me that it can't be done with standard C code. Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top