How to test Emails delivery on a developer server box, where outgoing emails are blocked

         –         In many business cases, there is every now and then a requirement to send emails to administrator or users of the system.

         At times, the outgoing emails are blocked on the dev boxes / servers, which hamper testing the email module in the    application.
         There is a workaround, to preview the outgoing email at the local dev box along with all the body, subject, recipients etc.

In the Web.config file for the application, place the following entries within the section.

<smtp deliveryMethod=“SpecifiedPickupDirectory”>
<specifiedPickupDirectory pickupDirectoryLocation=“c:\Mails” />
<proxy autoDetect=“true” />

The mail will be stored as a Mail message in the folder specified in the web config file, through which we can verify the contents and detail of the mail.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s