Configure DB Mail error

  • 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

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Lowell ......its working fine now.

  • 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.

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Lowell:-)

  • 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.

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply