| Author |
Message |
E-design
Joined: 01 Jun 2002 Posts: 947 Helped: 68
|
16 Aug 2007 3:37 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); |
|
|
| Back to top |
|
 |
ship_baba
Joined: 09 Aug 2007 Posts: 88 Helped: 1
|
17 Aug 2007 3:38 Re: Help needed to send email from simple C program |
|
|
|
|
| what os you are using
|
|
| Back to top |
|
 |
Google AdSense

|
17 Aug 2007 3:38 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
E-design
Joined: 01 Jun 2002 Posts: 947 Helped: 68
|
17 Aug 2007 5:31 Re: Help needed to send email from simple C program |
|
|
|
|
| It will be working with Windows XP
|
|
| Back to top |
|
 |
vinseth
Joined: 06 Jul 2007 Posts: 37 Helped: 3
|
20 Aug 2007 9:22 Help needed to send email from simple C program |
|
|
|
|
the code you have presented is with C++,i guess.
Did you refer some network books for C codes...
|
|
| Back to top |
|
 |
E-design
Joined: 01 Jun 2002 Posts: 947 Helped: 68
|
20 Aug 2007 17:08 Re: Help needed to send email from simple C program |
|
|
|
|
| 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
|
|
| Back to top |
|
 |