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
robertpmansion opened this Issue Jan 15, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@robertpmansion
Copy link

robertpmansion 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 label Jan 15, 2018

@jstedfast

This comment has been minimized.

Copy link
Owner

jstedfast commented Jan 15, 2018

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.

@jstedfast jstedfast closed this Jan 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment