Monday, March 12, 2012

How to configure Email notification?

Dear all,
I am not sure if I am posting my question at the right place. Anyway, I hope
someone can help me out.
I have a scheduled job in SQL server agent and I would like to configure the
email notification if the job fails. When I tried to create a new email
operator name, I clicked on the small button [...] besides the "Email Na
me"
textbox, an error message "Unable to logon to the mail system. You should
start a mail client (Microsoft Outlook or Microsoft Exchange Client) to use
this feature." appeared. Can any teach me how to do the configuration?
Thanks a lot!
Ivanhttp://support.microsoft.com/defaul...;263556&sd=tech
HTH, Jens Suessmeyer.|||I don't like the fact a mapi client has to be loaded on the box for SQL Mail
,
doesn't seem best practice... ...I prefer to use a script.
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Test Message"
objMessage.From = "SQLServer"
objMessage.To = "" 'Insert email address here.
objMessage.TextBody = "Notification message (" & FormatDateTime(Date,1) & ",
" & FormatDateTime(Time,4) & ")"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/sendusing") = 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/smtpserver") = "exchange" 'Insert your exchange server name here.
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
Set objMessage = Nothing
"Ivan" wrote:

> Dear all,
> I am not sure if I am posting my question at the right place. Anyway, I ho
pe
> someone can help me out.
> I have a scheduled job in SQL server agent and I would like to configure t
he
> email notification if the job fails. When I tried to create a new email
> operator name, I clicked on the small button [...] besides the "Email
Name"
> textbox, an error message "Unable to logon to the mail system. You should
> start a mail client (Microsoft Outlook or Microsoft Exchange Client) to us
e
> this feature." appeared. Can any teach me how to do the configuration?
> Thanks a lot!
> Ivan
>|||And for me I dont like using the old fashioned Scripting approach, did
you suggest using the xp_smtp_sendmail procedure. It uses a non-mapi
interface (SMTP) to send out mails, it has some restrictions, but and
the other hand some great features, like sending out HTML mails (I know
thats the hell for some of you guys :-) ), giving friendly names, etc.
You can download that on:
http://www.sqldev.net/xp/xpsmtp.htm
HTH, Jens Suessmeyer.|||I'm not sure if you will be upgrading to SQL 2005 anytime soon, but
mail is much improved in 2005. There is no need for email clients to
be installed and you don't have to write your own object and you don't
need any 3rd party xp.
Jens wrote:
> And for me I dont like using the old fashioned Scripting approach, did
> you suggest using the xp_smtp_sendmail procedure. It uses a non-mapi
> interface (SMTP) to send out mails, it has some restrictions, but and
> the other hand some great features, like sending out HTML mails (I know
> thats the hell for some of you guys :-) ), giving friendly names, etc.
> You can download that on:
> http://www.sqldev.net/xp/xpsmtp.htm
> HTH, Jens Suessmeyer.

No comments:

Post a Comment