Solved

xp_sendmail specify sender:

Posted on 2002-06-20
2
453 Views
Last Modified: 2007-12-19
I have a question regarding xp_sendmail in sql server 2000.

SQL Mail is using an Outlook profile called 'SQLMail',
which I have configured with a mailbox called 'SQLMail'.
The sa_sql-account has permissions to the mailbox.
Everything works fine.

Here comes the problem.
All the mails being sent comes from the same sender (SQLMail).
I would like to specify the sender.

Ex I have a table with message, subject, attachments, recipients and sender.
Sender is a valid exchange mailbox. sa_sql has permissions to all mailboxes on the exchange server.

In Outlook I can specify the sender in a From field. I want to do the same from sql server.
0
Comment
Question by:ola
2 Comments
 
LVL 6

Accepted Solution

by:
curtis591 earned 200 total points
ID: 7096540
I know of no way to do it with xp_sendmail but you might be able to use OLE Automation with Outlook from inside a SQL stored procedure to send your message.  
0
 
LVL 3

Author Comment

by:ola
ID: 7096657
I found an article on this.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312839

With this solution mails is sent through smtp.

I think I need a mapi solution. The mails sent should
be stored in 'Sent Items' in the senders Mailbox.

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now