First off, if you are using 1.0 of the framework you can not authenticate yourself at all, in 1.1 MS added the MailMessage.Field property that allows for this.
First I should point out that I have never had to authenticate myself when I send mail using this class BECAUSE the mail server I am sending mail through is internal and I am only delivering an email to an internal address. If, for example, I tried to send an email to my personal Gmail address through that mail server I would also get an error, something to the effect of "This mail server is not an open relay" or simply that the send failed.
You can see the obvious reason why mail servers are setup to prevent this type of thing (spammers heaven).
Anyway, to send authentication to your SMTP server do this:
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username"); //set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");//set your password here
-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
^^Thats my signature
|