Link to home
Start Free TrialLog in
Avatar of Jeff Everett
Jeff EverettFlag for United States of America

asked on

Confirmation email keeps included the server name. Need to not show server name in email

I have a stored procedure in my SQL database that sends a confirmation email upon signup, from my website to a new customer. I am trying to get the email that is sent to stop including the name of our admin. Basically when the server sends the email for some reason it keeps showing in the reply name ('user admin' noreply@xxxxxx.com). It was just a random name given to our admin when it was setup, but its so not what I want the user to see in their email. I just want it to be the address like 'noreply@xxxxx.com' without the admin name included. Every other email address I have created does not include this ever. My developer is out of reach now and he set up the original email account.

I have pasted in the code from the SQL database if that helps. I am just lost on this, I am sure its easy but I am pulling an over-nighter before launch and I am overlooking something. I may be off and it doesn't even matter about SQL but below is the stored procedure, the end of the it at least.

 exec msdb.dbo.sp_send_dbmail  
               @profile_name =  'no-reply'
                ,  @recipients =  @c_email_address    
                ,  @subject =  'Signup Confirmation'  
                ,  @body =  @c_body
                ,  @from_address = 'no-reply@oursite.net'
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

or you can adjust your dbmail profile to have  your sql server
or

include server name in the subject

for example:



Declare @MsgBody as varchar(200)
      SET @MsgSubject = @@servername +  ': Signup Confirmation'  

      EXEC msdb.dbo.sp_send_dbmail
      @profile_name = 'no-reply',
                 @recipients =  @c_email_address ,  
      @subject = @MsgSubject,
         @body =  @c_body
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
more
Database Mail Configuration Wizard
 technet.microsoft.com/en-us/library/ms175951.aspx
Avatar of Jeff Everett

ASKER

The profile was simply changed in the Exchange Admin console and seems to be working. Will update if it becomes necessary.