Mail Qued

  • Exec msdb.dbo.sp_send_dbmail

    @profile_name='SQLProfile',

    @recipients='ramana@yahoo.ccom',

    @body='This is informational msg only: SQLTest SQL Service possibly restarted',

    @subject=' SQL Server Services Restarted on Server';

    and schedule to run automatically when Agent starts

    but looks it ran several times but never receiving any emails

    Executed as user: Service Account. Mail (Id: 150126) queued. [SQLSTATE 01000] (Message 0). The step succeeded.

    I am receiving the test mails successfully

  • Is the user the Agent job is running under a member of the DatabaseMailUser role in the msdb database?

    The user will be the job owner - or if the job owner is a member of the sysadmin role then it will run under the SQL server agent service account.

  • What is the format of the send mail command you are using that worked successfully? It's also possible that your mail server is eating the emails from your Agent account, if you create a job in SQL Server and run your test email through that does it work?

  • Yes. Test email is working fine.

  • Add a log to a table step, and see if that runs when SQL Agent starts.

Viewing 5 posts - 1 through 4 (of 4 total)

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