Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Configure DB Mail error Expand / Collapse
Author
Message
Posted Friday, July 18, 2014 4:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, September 12, 2014 9:08 AM
Points: 100, Visits: 328
Hello All,

We are having MS SQL 2008R2 in our Windows Server 2008R2 and our organization mainiting Internal E-Mail.

Internal Emails are used to communicate within the employees of our organization only.

Now, I had configured MS SQL Database Mail with one Internal E-Mail ID with port number 25 and it's thrwing error

"The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 5 (2014-07-18T15:29:19). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender).
)".

I have enabled Database Mail also but still i am getting same error.

Please help me on this.

Thanks,
Arooj Ahmad
Post #1593988
Posted Friday, July 18, 2014 5:18 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:40 PM
Points: 12,897, Visits: 32,105
error 5.7.1 Client does not have permissions to send as this sender


this tells you the issue is not with SQL database mail but with the mail server.
that the mail server is requiring additional security related to impersonation, i believe,
it's probably related to using one mailbox to pretend it's another (ie address is "notifications@mydomain.com", but the credentials are for "alerts@mydomain.com",

you will need to get with your mail administrator on that one, to tell the server that a certain mailbox can send on behalf of other email addresses within the company. otherwise you need to change your mail process to not imersonate as anotheruser, but as the account being used for SMTP.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1593990
Posted Friday, July 18, 2014 6:20 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, September 12, 2014 9:08 AM
Points: 100, Visits: 328
Thanks Lowell ......its working fine now.
Post #1594007
Posted Friday, July 18, 2014 6:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, September 12, 2014 9:08 AM
Points: 100, Visits: 328
Now I have one more clarification. I configured to get mail when job is succeded. But I want to get mail when job is fail also. I try in Job properties-> notification and check email. There I can select only one either job is success or fail or complete.
can you please assist on this.
Post #1594013
Posted Friday, July 18, 2014 6:40 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:40 PM
Points: 12,897, Visits: 32,105
on the notifications Tab, if you select "When the job completes", that will send the email you are after, and the message will have whether it was successful or with errors, so you get an email in both situations.



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1594019
Posted Friday, July 18, 2014 6:47 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, September 12, 2014 9:08 AM
Points: 100, Visits: 328
Thanks Lowell
Post #1594021
Posted Friday, July 18, 2014 6:53 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, September 12, 2014 9:08 AM
Points: 100, Visits: 328
How can I send mail to the mulltiple user . Do i need to configure one more profile or in one profile we can send to the multiple user.
Post #1594024
Posted Friday, July 18, 2014 7:03 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:40 PM
Points: 12,897, Visits: 32,105
arooj300 (7/18/2014)
How can I send mail to the mulltiple user . Do i need to configure one more profile or in one profile we can send to the multiple user.


multiple users are defined as a semi colon delimited list in the to/cc/bcc parameters. they follow the standard rules for alias + <email>, or just as email addresses with no name/alias:

    EXEC msdb.dbo.sp_send_dbmail 
@profile_name='mydomain Database Mail',
@recipients='groupmail@mydomain.com;Lowell Izaguirre<lizaguirre@mydomain.com>;Brad Pitt <bpitt@mydomain.com>;Sylvester Stallone <sstallone@mydomain.com>',
@subject = 'Example SQL Alert ',
@body = @HTMLBody,
@body_format = 'HTML';



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1594029
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse