squinny
squinny

Reputation: 77

Is it possible to send an email in vb.net without SmtpServer.Credentials = New _ and Net.NetworkCredential

I was wondering if it is possible to send email in vb.net without the following code

SmtpServer.Credentials = New  _
Net.NetworkCredential("[email protected]", "password")

i am switching servers and i have a lot of websites that send emails with all the same credentials being sent from the server that is getting changed. My issue is when the change happens its going to affect the sites. My question is what does smptServer.Credentials = New _ really mean? and Net.NetworkCredentials("[email protected], "password") can you send without this. I am fairly new to this and i was looking at classic asp sites that we have and it doesnt require either of these credentials and works. Therefore i was wondering if it is possible to send emails without these in vb.net??

Thanks in advance!

Upvotes: 1

Views: 845

Answers (1)

prprcupofcoffee
prprcupofcoffee

Reputation: 2970

Some SMTP servers require a client to authenticate itself as a means of protection against relaying spam. Other servers don't. If the server you're using requires authentication, you have to provide it. Otherwise, you don't.

Upvotes: 1

Related Questions