Saturday, September 29, 2012

Tip: Sending email to local folder for ASP.NET local development

Many web applications and sites have features that require sending emails. In production, usually mailSettings element of is configured to send emails using SMTP server.
But when developing on a local machine, you want to check the output email quickly and without relying on a SMTP server. Sometimes a local antivirus can make the process harder.
It's better to configure the mail to send to a local folder, this can be easily done by setting the delivery method to SpecifiedPickupDirectory and setting the local directory location:
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="c:\Temp"/>

Now, when your code sends an email, a .eml file will be saved to c:\Temp, and you can double click it to check its content.


for IT the said...

This is an amazing blog,it gives very helpful messages to us.Besides that Wisen has established as Best Dot Net Training in Chennai. or learn thru ASP.NET Online Training . Nowadays Dot Net has tons of job opportunities on various vertical industry.

Nannie Co Pam said...

Great Article
IEEE Final Year Projects for CSE
IEEE Project Centers in Chennai