<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://shazwazza.com/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Shazwazza</title>
    <link>https://shazwazza.com/</link>
    <description>My blog which is pretty much just all about coding</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <image>
      <url>/media/0libq25y/frog.png?rmode=max&amp;v=1da0e911f4e6890</url>
      <title>Shazwazza</title>
      <link>https://shazwazza.com/</link>
    </image>
    <item>
      <guid isPermaLink="false">1158</guid>
      <link>https://shazwazza.com/post/testing-outgoing-smtp-emails-so-simple/</link>
      <category>Web Development</category>
      <category>etc...</category>
      <category>Hosting</category>
      <category>Servers</category>
      <title>Testing Outgoing SMTP Emails - So Simple!</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;At the &lt;a href="http://www.umbraco.org" target="_blank"&gt;Umbraco&lt;/a&gt; retreat before &lt;a href="http://www.codegarden09.com/" target="_blank"&gt;CodeGarden 09&lt;/a&gt; in Denmark, &lt;a href="http://www.aaron-powell.com/" target="_blank"&gt;Aaron&lt;/a&gt; had told me an extremely handy tip about testing outbound emails in your .Net applications. I'm not sure why I've never heard about this before and the funny thing is all of the .Net developers working in our office (including contractors) had never seen this before either! It's so incredibly simple and built into .Net, so if you don't know about this already you'll want to be using this in the future.&lt;/p&gt;  &lt;p&gt;If you application needs to send emails for whatever reason and you’re testing locally, you generally have to make sure that you're only sending emails to your address(es) so you’re not spamming a bunch of random people. This is an easy way to get around that and lets you view all of the emails sent. Just change (in our case add) a &lt;em&gt;deliveryMethod&lt;/em&gt; attribute to your &lt;em&gt;smtp&lt;/em&gt; settings to &lt;em&gt;SpecifiedPickupDirectory:&lt;/em&gt;&lt;/p&gt;  &lt;pre&gt;&amp;lt;system.net&amp;gt;
  &amp;lt;mailSettings&amp;gt;
    &amp;lt;smtp from=&amp;quot;noreply@localhost&amp;quot; deliveryMethod=&amp;quot;SpecifiedPickupDirectory&amp;quot;&amp;gt;
      &amp;lt;specifiedPickupDirectory pickupDirectoryLocation=&amp;quot;c:\maildrop&amp;quot; /&amp;gt;
    &amp;lt;/smtp&amp;gt;
  &amp;lt;/mailSettings&amp;gt;
&amp;lt;/system.net&amp;gt;&lt;/pre&gt;

&lt;p&gt;Now, all emails that are sent, just get saved to the specified folder and you can view them with Windows Live Mail, Outlook express, Thunderbird, or whatever.&lt;/p&gt;

&lt;p&gt;Nice!! &lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:14 Z</pubDate>
      <a10:updated>2023-03-23T15:08:14Z</a10:updated>
    </item>
  </channel>
</rss>