April 25, 2006 at 8:05 am
Good Morning,
I want to send email through SQL Server. I can use "xp_sendmail". But,for this I need User's email address. Here is what my requirement
1. How to find User's NT id from SQL Server.
2. How to get that NT id and based on that find out user's email address from common address book on xchange server.
Any help on this would be greatly appreciated.
Thanks and have a nice day.
Regards,
Ramesh.
April 25, 2006 at 10:22 am
usually the user has a smtp email address identical to their domain login - you can use this with the domain to create a mail address. You can run a standard script on exchnage to create smtp email addresses to match the login for all users.
given the spid you should now be able to find the username
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
April 25, 2006 at 10:42 pm
If you're using Active Directory, you could setup a linked server to run LDAP queries.
--------------------
Colt 45 - the original point and click interface
April 26, 2006 at 7:28 am
Folks,
can you give some examples or some details about this? basically i am new to all this and doesn't have much idea about SMTP or anything as such.
Thanks,
Ramesh.
April 27, 2006 at 4:45 am
For the Active Directory information a quick search of this site found these,
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=13037
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=102117
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=9&messageid=153994
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=188480
Doubtless you would find more if you searched via Google.
--------------------
Colt 45 - the original point and click interface
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply