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

documentation on how to configure credentials from the appsettings.json file #136

Open
doreille opened this issue Jul 19, 2024 · 2 comments

Comments

@doreille
Copy link

doreille commented Jul 19, 2024

The configuration parameters have changed in version 3.0.
Prior to version 3.0, SMTP credentials were configured using the userName and password attributes.
From version 3.0 onwards, the SMTP credentials are configured using the credentials attribute which has the ICredentialsByHost interface type.

I haven't found any documentation or examples of how to set this. I try

"credentials": {
"type": "System.Net.NetworkCredential, System.Net.Primitives",
"UserName": "#########",
"Password": "#########"
}

but this return the error System.InvalidOperationException: 'Cannot create instance of type 'System.Net.ICredentialsByHost' because it is either abstract or an interface.'

@jlrouzies-mantu

This comment was marked as duplicate.

@bartelink

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants