<configuration>Recently I learned that when developing we can output to ".eml" files directly to our C:\ drive if we configure like so:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="smtp.example.com" />
</smtp>
</mailSettings>
</system.net>
</configuration>
<configuration>The .eml files can be opened and read using Notepad. I'm told Outlook can open them, but I'm not sure if Lotus Notes can.
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<network host="ignored" />
<specifiedPickupDirectory pickupDirectoryLocation="c:\ExampleEmailPickupFolder" />
</smtp>
</mailSettings>
</system.net>
</configuration>
If you ever want to test email capabilities while developing locally you no longer have to be shy about it, but can output directly to files. Another useful feature is that you don't have to be worry about accidently emailing a user since we know emails are not sent, but we can see what every email that would have been sent looks like.
No comments:
Post a Comment