A
Alberto
Could you tell me how to send an e-mail from a code written in C#?
thank you.
thank you.
Could you tell me how to send an e-mail from a code written in C#?
thank you.
Dave Sully said:I'm probably being dense here as I'm new to C# (forgive me if I am), but
does this code work ??
Just tried, I don't seem to have a System.Web.Mail namespace ?? Just a
System.Web
Missing the obvious ?? Or is this wrong ??
-----Original Message-----
From: Klaus H. Probst [mailto:[email protected]]
Posted At: 12 July 2004 17:52
Posted To: microsoft.public.dotnet.languages.csharp
Conversation: send an e-mail.
Subject: Re: send an e-mail.
As long as you have a valid SMTP server that can relay for you, this
will
work:
using System.Web.Mail;
...
MailMessage message = new MailMessage();
message.From = "(e-mail address removed)";
message.To = "(e-mail address removed)";
message.Subject = "Hello";
message.Body = "World";
SmtpMail.SmtpServer = "my.smtpserver.com"; SmtpMail.Send(message);
--
Klaus H. Probst, MVP
http://www.vbbox.com/
Alberto said:Could you tell me how to send an e-mail from a code written in C#?
thank you.