USe SMTP to Send Mail

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

hi

I am using System.Web.Mail.MailMessage with System.Web.Mail.SmtpMail to
send mail. now the my question is,

Is it compulsory to add fields smtpauthenticate, sendusername and
sendpassword fields to MailMessage Object????.

mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
"1")
mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
SMTPEmail)
mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
SMTPPassword)

Which fields will i have to add if my SMTP Server doesn't require
authentication.
 
Is it compulsory to add fields smtpauthenticate, sendusername and
sendpassword fields to MailMessage Object????.

Only if your mail server requires authentication...
Which fields will i have to add if my SMTP Server doesn't require
authentication.

None.
 
Back
Top