We help IT Professionals succeed at work.

xp_smtp_sendmail does not post an email in the Sent Mailbox

wsturdev asked
I am using xp_smtp_sendmail to send emails from SQL Server 2005.  Each email has a @FROM parameter that is filled in with the email address of the person from whom the email is supposedly coming.  This allows the recipient to respond to a live person by simply using his Reply function.

But, the "sender" does not know the database has done this because his Sent Items mailbox has nothing in it.  

Meanwhile, I have developed a workaround -- I have been using the @BCC option, but it is tricky...  If the @FROM and @BCC addresses are the same, either the xp_smtp_sendmail logic, or the email server, I am not sure which, recognizes that fact and since nothing is placed into the @FROM Set Items mailbox, the BCC recipient gets no email either.  

In my company, it so happens we can use either of 2 email address forms: "myEmailID@MyCompany.com" or "FirstName.LastName@MyCompany.com".  This allows me to "trick" the system.  By using the first form for @FROM and the second form for @BCC, a blind copy ends up in the In Box of the sender.  Not a preferred method, but the best I seem to be able to do, pending the answer to this post.

The problem with my work-around is that some people have been set up like all the rest of us with FirstName.Lastname in the email system, but in the database I am working with, they were set up as NickName.LastName.  So, now I will have to store their email ID, their formal name and their nickname and do translations.  Do-able, but a pain, unless...

Is there a way to cause a copy of the generated email to be posted in the Sent Items mailbox of the @FROM email address?
Watch Question

@FROM and @BCC are not the same, @BCC allows you to include recipients which will not be displayed.
You won't be able to have an email show up in another persons sent items - as sent items is a mail system specific thing.  All mails received by someone will goto their inbox, unless they have rules setup to move those emails to somewhere else.
Unless you have some application that sends the email as the person ie a MAPI client for exchange which sends the email, this will cause Exchange to generate the email in their sent items.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.