如下代码
MailMessage m = new MailMessage();
m.From = "[email protected]";
m.To = "[email protected]";
m.Subject = "test in my computer programming";
m.Body = "hahha,success";
SmtpMail.SmtpServer = this.TextBox1.Text;//没有SmtpMail,咋回事
SmtpMail.SmtpServer = this.TextBox1.Text;//没有SmtpMail,咋回事呢?
MailMessage m = new MailMessage();
m.From = "[email protected]";
m.To = "[email protected]";
m.Subject = "test in my computer programming";
m.Body = "hahha,success";
SmtpMail.SmtpServer = this.TextBox1.Text;//没有SmtpMail,咋回事
SmtpMail.SmtpServer = this.TextBox1.Text;//没有SmtpMail,咋回事呢?
{
MailMessage mm=new MailMessage();
mm.To=SendAddress;
mm.From="<大能光>[email protected]";
mm.Subject=MailTitle;
mm.BodyFormat=MailFormat.Html;
mm.Body=MailBody;
mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "[email protected]"); mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "pop.yahoo.com");
SmtpMail.SmtpServer="smtp.yahoo.com";
SmtpMail.Send(mm); }