Maybe now its a good time to explain my process that is currently running.
The process runs once every 45 minutes. It sends emails to recipients asking for feedback on a property they have shown. The recipients are real estate agents who have shown a property. The sender is the real estate agent who is selling the property. For each property a real estate agent is selling, they can opt-in to this process which will automatically send out feedback requests on their behalf after a house showing has occured. Also, the emails are html-emails, and the "From" needs to be the selling agent.
There are 2 types of emails.
1. Re-sends: An agent can send a request up to 3 times without a response. Each re-send will go out at least 24 hours after the previous request has been sent. Once a response has been received/submitted, they can no longer send a request to the showing agent for this particular showing.
2. First time sends: A record of sending is only created after the first email has been sent out. So, first, I get the records of each showing and showing data, where that showing has happened, for all properties that have "auto-send" turned on.
*Not every agent elects to have their properties use the auto-send, so there is a flag to mark those that have auto-send turned on. I use this flag for the "re-sends". Also, while auto-send is turned on, they can still manually send out a feedback request.
There is a lot more specifications/requirements, but the above is the meat of it.
I guess if xp_sendmail allows me to modify the "From" so that the emails seem to be coming from the listing agent, and if the email message can be in HTML format, I would use xp_sendmail. If not, then I would like to know how to have SQL Server request my processing page so that I don't need to rely on a Coldfusion scheduled task to process this page.