sp_send_dbmail @reply_to=myname@myemail.com not working

  • When dbmail is sent it shows someone else's name as sender.  I want it to show mine so I make @reply_to = myname @myemail.com (not my real email).  Still when the email is delivered it is showing another person's email address as sender.

    I opened Database Mail Configuration Wizard and modified profile, overwriting that other person's email with my own per instructions here https://docs.microsoft.com/en-us/sql/relational-databases/database-mail/create-a-database-mail-profile?view=sql-server-ver15

    I also tried setting @from_address = myname@myemail.com but then the email doesn't even send.

    My sproc resides in msdb database and is trigger by a sql agent job. It is working perfectly fine whether trigger with execution or from sql agent job,  the only problem is that sender is shown as someone other than myself.  What can I do to resolve?

    • This topic was modified 2 years, 6 months ago by  polkadot.

    --Quote me

  • Does the profile require authentication?  Or is it anonymous auth?

    Seen it do this with a username and password required to send before.

  • the solution was to create a new profile and reference it with @profile_name.

    New profile is SQL Email

    and it is referenced like this

    exec msdb.dbo.sp_send_dbmail @profile_name='SQL Email', etc.

     

    --Quote me

Viewing 3 posts - 1 through 3 (of 3 total)

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