Actually, I believe that there is a way, but you have to specify the headers
manually.
For an example, see;
http://www.paulsadowski.com/WSH/cdo.htm
'==This section provides the configuration information for the remote SMTP
server.
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") =
cdoBasic
'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"youruserid"
'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"yourpassword"
However, Mark's recommendation is best; there are a number of solid
..NET-specific email components out there with fantastic capabilities.
You'll probably be better off avoiding CDO.
/// M
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message
news:uY**************@TK2MSFTNGP12.phx.gbl...
The mail functionality that the System.Web.Mail class represents doesn't
have authenticated SMTP mail capabilities. You'll need to find another
compoennt in order to send an SMTP server that requires authentication.
Tgere are lots of free ones out there though so that's not a big problem.
There's an open-source SMTP project at:
http://sourceforge.net/projects/opensmtp-net/ that may work nicely.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
"T.Archer" <tarcher @t beyondwebsites d0t com> wrote in message
news:eE**************@TK2MSFTNGP11.phx.gbl... The host a client wants to use requires authentication to relay
messages.
How do I set the authentication (username/password) before using the
smtpmail.send(mailmessage) method?
Surely this must be a common thing to do. I have been utterly unable to
google an answer.
--Tony Archer