use Using in first line when you cerate mail object rest of the thing is fine like using ( MailMessage Message = new MailMessage()) { } Markus Hardiyanto <markus (AT) revti (DOT) comwrote: Hello, can some one help me on how to send email using SMTP authentication? i already tried the code below and get "could not access CDMessage object" using System; using System.Web.Mail; using System.Windows.Forms; MailMessage Message = new MailMessage(); // SMTP Authentication Message.Fields.Add("","1"); Message.Fields.Add("","user"); Message.Fields.Add("","pass"); Message.To = strTo; Message.From = strFrom; Message.Subject = strSubject; Message.Body = strBody; try { SmtpMail.SmtpServer = strMailServer; SmtpMail.Send(Message); } catch(System.Web.HttpException ehttp) {MessageBox.Show(ehttp.Message.ToString()); }