Reputation: 1398
I have two questions: 1) How do I send an email in C#, but have it end up in a drop folder to be sent from there rather than being sent straight out by SMTP?
2) For a production machine, do I use IIS to process the dropfolder, or should I purchase a 3rd party product for this?
Thanks!
Upvotes: 3
Views: 1400
Reputation: 2516
You can also set this in code on the DeliveryMethod property of the SmtpClient object.
SmtpClient client = new SmtpClient();
client.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;
client.PickupDirectoryLocation = "C:\DropFolder";
Upvotes: 2
Reputation: 172330
In your web.config:
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="C:\myDropFolder" />
</smtp>
</mailSettings>
</system.net>
Whether to use IIS or some third party product... I guess that depends on your needs. Is there a particular feature you would like and that the IIS SMTP server does not have?
Upvotes: 8