How to set username and password for SmtpClient object in .NET?
Posted
by Ryan
on Stack Overflow
See other posts from Stack Overflow
or by Ryan
Published on 2010-05-04T16:05:43Z
Indexed on
2010/05/04
16:08 UTC
Read the original article
Hit count: 358
c#
|smtpclient
I see different versions of the constructor, one uses info from web.config, one specifies the host, and one the host and port. But how do I set the username and password to something different from the web.config? We have the issue where our internal smtp is blocked by some high security clients and we want to use their smtp server, is there a way to do this from the code instead of web.config?
© Stack Overflow or respective owner