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

Comments

@rpmansion
Copy link

@rpmansion 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
Copy link
Owner

@jstedfast 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
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants