<p>I'm developing a website on an XP virtual machine and have an SMTP virtual server set up in IIS -- it delivers mail just fine. What I would <em>like</em> is to confirm that any emails the site sends are only going to a specific domain.</p>

<p>The XP firewall seems to only involve incoming connections, I can't block outgoing TCP on port 25. And I haven't been able to configure the SMTP server to filter by delivery address.</p>

<p>With this setup, is there any easy way to filter outgoing email by destination address?</p>

[{'answer_id': 74554, 'author': 'Vaibhav', 'author_id': 380, 'author_profile': 'https://Stackoverflow.com/users/380', 'pm_score': 0, 'selected': False, 'text': "<p>I think the easiest way would be to add a check to your mail sending code on the website (there's got to be some class which is in charge of sending the mails out).</p>\n\n<p>You could include a check which is only active when the code is compiled in debug mode (using compiler directives). Thus, when you are developing and building the site in debug mode, this code checks if the outgoing messages are valid (specific domain) or not. If they are it lets them go, else it doesn't send the mail.</p>\n"}, {'answer_id': 75434, 'author': 'Neil C. Obremski', 'author_id': 9642, 'author_profile': 'https://Stackoverflow.com/users/9642', 'pm_score': 2, 'selected': True, 'text': '<p>Here\'s one idea:</p>\n\n<p>Under <code>Advanced Delivery</code> options (<code>SMTP Virtual Server Properties</code> &gt; <code>Delivery</code> tab &gt; <code>Advanced</code>).  There you can set a "Smart Host" which is the SMTP server that will be used to actually send the mail, so you could possibly have it deliver directly to the specific domain\'s incoming SMTP server.</p>\n'}]
['https://Stackoverflow.com/questions/74494', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13071/']