Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can we override default SMTP settings for sending a mail using .Net?
Posted

1 solution

You can set the host, port, and other settings when you create the mail message. See https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient(v=vs.110).aspx[^]
 
Share this answer
 
Comments
Richard Deeming 23-Apr-15 16:04pm    
Nit-picking: you override the values when you create the SmtpClient, not when you create the MailMessage. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900