I would like to test my email sending functionality using .NET (C#) framework or any compatible library, any suggestion how to do it?
If you need test sending e-mail only, you can configure your .config file like this
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="C:\TempMail" />
</smtp>
</mailSettings>
</system.net>
With these settings your messages are not sent over the network, but are dropped as physical files with .eml extension in the folder you configured in the pickupDirectoryLocation
attribute. You can check them with the help of classes in the System.IO
namespace.
<smtp>
Element (Network Settings)
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