SMTP access in VB.Net 2005?

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!
 
J

jim

In fact, I don't even need to send an email for my needs, I just need to
authenticate to the server.
 
S

ShaneO

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top