-
Notifications
You must be signed in to change notification settings - Fork 427
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
Using Default with SSL #16
Comments
Unfortunately you cannot use the web.config to set SSL it has to be managed by hand. Fluent email has a method called UseSSL that turns it on. eg. var email = Email
.From("john@email.com")
.To("bob@email.com", "bob")
.UseSSL()
.Subject("hows it going bob")
.Body("yo dawg, sup?"); |
Luke, I have tested this and if I put on my web.config that it uses ssl, when it creates the client, the ssl option is marked as true, and the code in Send set it to false, since I don't used the fluent method with it. My code its like this: var email = Email
.FromDefault()
.To("bob@email.com", "bob")
.Subject("hows it going bob")
.Body("yo dawg, sup?");
<system.net>
<mailSettings>
<smtp from="john@email.com">
<network enableSsl="true" host="smtp.email.com" defaultCredentials="true"/>
</smtp>
</mailSettings>
</system.net>
|
I will have to test the web.config thing because as far as I am aware the smpt client does not use the enableSsl attribute in the web config (http://stackoverflow.com/questions/454277/how-to-enable-ssl-for-smtpclient-in-web-config). I do see what you are saying though so we might make the private _useSsl field nullable then only set the smtp client to use or not use ssl if it has been set. |
Luke it has a comment in the first response that says tha in .Net 4 my configuration works, and I have tested too. Since Fluent Email is using Razor templates you can presume that this configuration is valid. |
Ah of course. Will fix up the code soon. |
* Added simplified configuration for embedded templates
When using the default email configuration from web.config, the ssl setting is getting overrided on sending.
It should have an flag that we are using the default configuration and do not override the ssl configuration.
The text was updated successfully, but these errors were encountered: