How can I Sende email notification Form Shaduled job in sql server 2008

Hi experts:


I hope somebody can help in this
I need to receive email notification when my job tasks in sql server succeed or competed or failed
I did the following
1 - I configure my sql server 2008 to send email notification and I tested successfully
By creating profile and account.
2 - From SQL server surface area configuration manager I did enabling Database mail stored procedure
3 - Port 25 opened
4 - I run the following scripts
sp_CONFIGURE 'show advanced', 1
GO
RECONFIGURE
GO
sp_CONFIGURE 'Database Mail XPs', 1
GO
RECONFIGURE
GO

When I test by running the following script I receive the email .
USE msdb
GO
EXEC sp_send_dbmail @profile_name='Profile1',
@recipients='mhaidar@skmc.ae',
@subject='Test message',
@body='This is the body of the test message.
Congrates Database Mail Received By you Successfully.'

5- I create operator … MAK
6 - I create backup task and I configure it to send email notification to operator MAK
My Problem That I did not receive the email when job succeed or competed or failed

I need help please
Haidar1Asked:
Who is Participating?
 
Ramesh Babu VavillaConnect With a Mentor Commented:
did you enable the mail profile in agent properties,ceck the image attached
123.JPG
0
 
Haidar1Author Commented:
I forget to mention ... I did restart to the SQL agent ....
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Haidar1Author Commented:
thanks a lot a spend all my day for this.


Regards
0
 
Haidar1Author Commented:
Hi experts
Yesterday .. I did above configuration and was successful
today change the account ... but the test failed i returen the account as before but no lcuk , can you help plesae?

I am getting the following message

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2011-09-15T09:56:19). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated).
)
0
 
gaurav05Commented:
Hi,

Basically answer to this error is that mention an account name who has the rights to send an email in the Basic Authentication option .

also check with following URL
http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/
0
 
gaurav05Commented:

Also check this :

Use smtp.gmail.com for the server
port to 587 (Use port 587, port 465 lets you waiting)
Require secure connections checked
*Basic authentication*
username (use the full email address with @gmail.com)
password (RETYPE – the SSMS messes up the password so the autentication fails with port 587)

You may also want to read this…
(http://support.microsoft.com/kb/970315/LN/kb/968834/)
(http://support.microsoft.com/kb/968834/ )

0
 
Haidar1Author Commented:

Thanks for youre reply

I saw this link before ...but I dont know what shall I do I return the account as before ... but still not wroking???

I hope if you can help
0
 
gaurav05Commented:
Try this.

start – programs – microsoft sql server 2008 –
configuration tool – sql server surface area configuration – surface area configuration and features

the two more things what we have to keep these things in mind while configuring database mail:

* by default port for database mail is 25.
so open that port in the firewall.

* grant permissions to relay e-mail through SMTP

start – administrative tools- Internet Information Services – expand local computer – default SMTP virtual Server Properties
- thn click tab Access thn Relay – add -
then enter IP address – click ok
0
 
Haidar1Author Commented:

I use in the username : username@domain.com

regarding the port 25 is opend

0
 
Haidar1Author Commented:
I am getting the following error

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2011-09-15T08:32:24). Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated).
)
0
 
Ramesh Babu VavillaCommented:
check your sntp mail server.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.