SMTP access in VB.Net 2005?

  • Thread starter Thread starter jim
  • Start date Start date
J

jim

I can find code that shows how to connect and send messages to an SMTP
server in VB.Net 2005, but none of them show how to use an SMTP server that
requires a user login and password.

Does anyone know how to use an SMTP server, with a username and password,
from VB.Net 2005?

Thanks for your help!
 
In fact, I don't even need to send an email for my needs, I just need to
authenticate to the server.
 
jim said:
I can find code that shows how to connect and send messages to an SMTP
server in VB.Net 2005, but none of them show how to use an SMTP server that
requires a user login and password.

Does anyone know how to use an SMTP server, with a username and password,
from VB.Net 2005?

Thanks for your help!

Lookup "SmtpClient.Credentials" in Help.

The following should provide you with a start -

Dim SmtpClient As New SmtpClient(strSmtpServer, Port)
SmtpClient.Credentials = New Net.NetworkCredential(strUserName,
strUserPassword)


ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 
Back
Top