Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to consume system.net settings in the web.config? #630

Closed
rpmansion opened this issue Jan 15, 2018 · 1 comment
Closed

how to consume system.net settings in the web.config? #630

rpmansion opened this issue Jan 15, 2018 · 1 comment
Labels
question A question about how to do something

Comments

@rpmansion
Copy link

rpmansion commented Jan 15, 2018

Hi there,

I'm using ASP.NET 4.5 MVC and would like to use the MailKit, however, how do you use the system.net in my web.config to MailKit?

<system.net>
        <mailSettings>
            <smtp deliveryMethod="Network" from="system@company.com">
                <network host="localhost" />
            </smtp>
        </mailSettings>
    </system.net>

I would just like to use the web.config and would not like to add any literal strings configuration to my codes so that to make things simple and organised.

@jstedfast jstedfast added the question A question about how to do something label Jan 15, 2018
@jstedfast
Copy link
Owner

You'll have to write your own custom code to parse web.config to get the values.

MailKit doesn't parse web.config and never will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question about how to do something
Projects
None yet
Development

No branches or pull requests

2 participants