?
Solved

xp_sendmail specify sender:

Posted on 2002-06-20
2
Medium Priority
?
470 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
curtis591 earned 600 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

752 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