Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
QuestionCMD.EXE from C# .net Pin
cristi_alonso8-May-08 1:34
cristi_alonso8-May-08 1:34 
AnswerRe: CMD.EXE from C# .net Pin
natsuyaki8-May-08 2:11
natsuyaki8-May-08 2:11 
QuestionmyProcess.StandardOutput Issue Pin
Harvey Saayman8-May-08 1:22
Harvey Saayman8-May-08 1:22 
AnswerRe: myProcess.StandardOutput Issue Pin
natsuyaki8-May-08 1:45
natsuyaki8-May-08 1:45 
QuestionPen Drive Pin
Bhim Prakash Singh8-May-08 0:53
Bhim Prakash Singh8-May-08 0:53 
AnswerRe: Pen Drive Pin
Christian Graus8-May-08 1:13
protectorChristian Graus8-May-08 1:13 
AnswerRe: Pen Drive Pin
Spunky Coder8-May-08 1:13
Spunky Coder8-May-08 1:13 
QuestionSending a E-mail in C# Pin
imnotso#8-May-08 0:21
imnotso#8-May-08 0:21 
Hi,

Can someone try to tell me the definitive (like, yeah) way of sending a mail in c# from my website. I'm .NET2, Visual Sudio 2005 and have a 3 simple textboxs and a send button on my site for people to get in touch. I want it to send me the text1 as a subject, text2 as the body, text3 as their mail address (which they have manually typed in)

Obviously I've been round the web.....

private void Button1_Click(object sender, System.EventArgs e)
{
MailMessage mail = new MailMessage();
mail.To = txtTo.Text;
mail.From = txtFrom.Text;
mail.Subject = txtSubject.Text;
mail.Body = txtBody.Text;
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(mail);
}

these seem out of date, and how do I test locally on my machine? Do I put 'localhost' as my SMTP server? until it goes live?

Any help would be great.

Thanks

Harvey
AnswerRe: Sending a E-mail in C# Pin
N a v a n e e t h8-May-08 0:28
N a v a n e e t h8-May-08 0:28 
GeneralRe: Sending a E-mail in C# Pin
imnotso#8-May-08 0:47
imnotso#8-May-08 0:47 
GeneralRe: Sending a E-mail in C# Pin
imnotso#8-May-08 1:09
imnotso#8-May-08 1:09 
GeneralRe: Sending a E-mail in C# Pin
Christian Graus8-May-08 1:11
protectorChristian Graus8-May-08 1:11 
GeneralRe: Sending a E-mail in C# Pin
imnotso#8-May-08 1:43
imnotso#8-May-08 1:43 
GeneralRe: Sending a E-mail in C# Pin
Christian Graus8-May-08 1:48
protectorChristian Graus8-May-08 1:48 
GeneralRe: Sending a E-mail in C# Pin
imnotso#8-May-08 1:57
imnotso#8-May-08 1:57 
GeneralRe: Sending a E-mail in C# Pin
Christian Graus8-May-08 2:17
protectorChristian Graus8-May-08 2:17 
GeneralRe: Sending a E-mail in C# Pin
N a v a n e e t h8-May-08 2:59
N a v a n e e t h8-May-08 2:59 
GeneralRe: Sending a E-mail in C# Pin
imnotso#8-May-08 3:14
imnotso#8-May-08 3:14 
GeneralRe: Sending a E-mail in C# Pin
N a v a n e e t h8-May-08 3:27
N a v a n e e t h8-May-08 3:27 
AnswerRe: Sending a E-mail in C# Pin
RedHotFunk8-May-08 13:57
RedHotFunk8-May-08 13:57 
Questionwhat is regular expression correponding to this string [Select]? Pin
syamooo8-May-08 0:20
syamooo8-May-08 0:20 
AnswerRe: what is regular expression correponding to this string [Select]? Pin
Christian Graus8-May-08 1:11
protectorChristian Graus8-May-08 1:11 
AnswerRe: what is regular expression correponding to this string [Select]? Pin
Ashfield8-May-08 1:12
Ashfield8-May-08 1:12 
QuestionXML message generation Pin
George_George7-May-08 23:25
George_George7-May-08 23:25 
AnswerRe: XML message generation Pin
natsuyaki7-May-08 23:40
natsuyaki7-May-08 23:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.