TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Basit Khan
NA
336
122.6k
Send Email in SQL
Aug 16 2015 4:40 AM
Dear,
i created a trigger on CustomerCall when call inserted & Assign to particular user i want to send email.
Below is the working trigger only how to get the Assign user email address from User Table
User-Table
us_No
Us_Name
Us_Password
Us_Email
I want when the customer call assign to particular user take that email address and put it in below trigger.
alter TRIGGER CallInserted
ON [dbo].[CustomerCall]
FOR INSERT
AS
BEGIN
SET NOCOUNT ON;
IF EXISTS (SELECT * FROM inserted)
BEGIN
EXEC msdb.dbo.sp_send_dbmail
// here how to get receipent email from User table
@recipients = 'recipients',
@profile_name = 'SendEmailCM',
@subject = 'Notification',
@body_format = 'html',
@body = 'body'
END
END
GO
Reply
Answers (
1
)
You have an error in sql syntax
sql installation steps