How to read email address, host, port number from smtp settings sectio(dotnetspidor.blogspot.com)
submitted by
sangam100(357) 2 years, 8 months ago
How can I read the email address, smtp host, port number from my mail settings section of the web.config file in an asp.net web application? Yeah, we can specify an email address in the mail settings section of web.config file and read it from asp.net web page in the time of sending an email. We can also read the smtp host and port number which is necessary while sending email from an asp.net web page. I have already discussed: How to send email from asp.net web page. So here I would just put the coding to read email address, host, port number from mail settings section of web.config file in asp.net web application.
Let's look into the mail setting portion of a web.config file.
While sending an email, we need from, to email addresses and an smtp client also. So the code snippet below puts them together.
|category: ASP.NET
|Views: 25
tags:
ASP.NET another
Everyones tags:
Your Tags: