How do I accomplish this? The SMTP class throws error on dev machine about not finding an SMTP server. Is there a way to test sending emails on development machine?
Navigate to System administration > Setup > Email parameters and click the Configuration tab, then set Batch email provider to SMTP. Next, click the SMTP settings tab. Here we need to enter parameters for smtp4dev as follows: Set Outgoing mail server to localhost and SMTP port number to 25.
Shawn,
Straight from my web.config:
<smtp deliveryMethod="SpecifiedPickupDirectory">
<network host="ignored" />
<specifiedPickupDirectory pickupDirectoryLocation="c:\email_c#" />
</smtp>
this works fine insofar as being able to review the 'emails' that get saved into the pickupDirectoryLocation directory.
Give it a try...
You can dump the files on disk, by configuring System.Net.Mail.SmtpClient
to use a deliveryMethod of type SpecifiedPickupDirectory
, I found an example on SO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With