Last active
August 29, 2015 14:08
-
-
Save sdanna/25da45532a75477f90ad to your computer and use it in GitHub Desktop.
web.config - Send email to directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EmailConfig | |
{ | |
public static void Configure() | |
{ | |
#if(DEBUG) | |
// Allows for a good F5 from Visual Studio experience. | |
const string emailDropFolder = "C:\\Email-Drop\\"; | |
if (!Directory.Exists(emailDropFolder)) Directory.CreateDirectory(emailDropFolder); | |
#endif | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.net xdt:Transform="Replace"> | |
<mailSettings> | |
<smtp from="test@test.com" deliveryMethod="Network"> | |
<network host="smtp.test.com" defaultCredentials="true" userName="test@test.com" password="testabc12345" /> | |
</smtp> | |
</mailSettings> | |
</system.net> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.net> | |
<mailSettings> | |
<smtp deliveryMethod="SpecifiedPickupDirectory"> | |
<specifiedPickupDirectory pickupDirectoryLocation="C:\Email-Drop\" /> | |
</smtp> | |
</mailSettings> | |
</system.net> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment