Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8923703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:12:30+00:00 2026-06-15T07:12:30+00:00

I currently have the need to set up an outgoing SMTP server with an

  • 0

I currently have the need to set up an outgoing SMTP server with an extra twist to it. If a user sends an email and this server receives the mail then it should validate the the email address that the message was sent from to a SQL database.

i.e: I have a table with email addresses and a status column for ACTIVE/INACTIVE. A user sends an email and it gets sent to the SMTP server. When the email is received by the SMTP server, the server should take the email address that the mail has been sent from and validate it against the database to check the email address’s corresponding status. If that status is active then the message should relay to the to address. If not, a reply message should be sent to that email address stating that the email is inactive.

My question is thus. Will it be best to write my own SMTP server app in C# that does this or is there a sort of an out of the box solution such as IIS that I can set up some how to get this functionality?

Re-writing my own email server app in C# seems like a dirty solution and a recreation of the wheel?

I read something about OnArrival functionality on an IIS SMTP server that can take scripts. Any thoughts on that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:12:31+00:00Added an answer on June 15, 2026 at 7:12 am

    I think this is what will help you up:
    Pipe incoming email to a script on Windows IIS SMTP?

    Part from answer:

    The IIS SMTP service can send email, and also accept email.

    Here is what you want to do.

    Configure your IIS SMTP service to accept emails for a domain (You can
    configure this in the properties of the IIS SMTP service, under
    domains). Say domain name “myserver.example.com”

    Then, in your DNS server, configure a MX record that points to
    “myserver.example.com”.

    Now, when email gets sent to your IIS SMTP server, it will actually
    get placed in your mailroot/drop folder (you can also change this
    folder in the IIS SMTP Service properties).

    Now that you are accepting email, the next step is to write a script
    that will:

    1)Parse the emails.

    2)Modify them accordingly (do you just want to change the “to”
    address?).

    Here is the trick, so you need to parse the incoming emails and forward only those which validate the email.. and which do not pass the validation, read the “FROM” address from email and reply him!

    3)If you want to resend the emails, then you need to modify them
    accordingly. You will need to add a single X-Sender header, that is
    used to identify the email address sending the email, and a X-Receiver
    header, for each recipient that is going to accept the email. Here is
    an example email that was modified:

    X-Sender: me@mywebsite.com X-Receiver: recip1@theirdomain.com
    X-Receiver: recip2@theirdomain.com From: “jim bob”
    To: Subject: test MIME-Version: 1.0
    Content-Type: text/plain; Message-ID:
    <024f01c9e130$b3eca500$0401a8c0@local>

    test Once you have this modified content, you will want to write it to
    a file in the mailroot/pickup directory. Be sure to use a unique name.

    The IIS SMTP Service will come by, pickup the email, and relay it on,
    sending the email using the X-Sender as the MAIL FROM address, and
    sending it to each email address listed in each X-Receiver header.

    4)Run this script as a scheduled task. Another option is to build it
    as a windows service, or to implement something like a
    filesystemwatcher, where it executes each time an email is created as
    a file.

    5)Another option to all of this is to actually implement a SMTP Event
    Sink, but I think that is overkill for what you want to do, and can
    create more headaches, than it solves. I would only go the event sink
    route if I like pain.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this need to import (currently) about 15k products. Each product has
I currently have an array set up like this: $u_id= array( array( NUM=>'2770', DESC=>'description
I currently have existing code that automates and email and sends files. I now
I currently have a need for a custom ListViewItem class - let's call it
I currently have a class where I need accomplish the equivalent of the following
I currently have a web site hitting 7 Access DBs that I desperately need
I currently have event.stopPropagation() to work on a few selectors, but now I need
I currently have a SQL query that returns a number of fields. I need
I need some advice of how to setup my tables I currently have a
Currently I have a class that is extending the ListActivity class. I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.