Link to home
Start Free TrialLog in
Avatar of GeniusSteals
GeniusSteals

asked on

Reply Email Address in Database Mail being Ignored

Hi I have a Database Mail account that is using an administrator email account to send out various information to users.  This email address should not however be the reply address which should be the development team.
I have set up the account as follows
E-Mail Address: Administrator@mycompany.co.uk
Display Name: Administrator Reports-Server
Reply e-mail: IT@mycompany.co.uk
Server name: Mymail   Port Number:  25
The email function works fine, but when a recipient hits reply, Outlook is addressing the new email to Administrator@mycompany.co.uk rather than IT@mycompany.co.uk

Is this the expected behaviour?  How can I get replies to come to the right mailbox?

Thanks
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Multi steps.... easy to skip one...



-- Create a Database Mail account
EXECUTE msdb.dbo.sysmail_add_account_sp
    @account_name = 'AdventureWorks Administrator',
    @description = 'Mail account for administrative e-mail.',
    @email_address = 'dba@Adventure-Works.com',
    @replyto_address = 'danw@Adventure-Works.com',
    @display_name = 'AdventureWorks Automated Mailer',
    @mailserver_name = 'smtp.Adventure-Works.com' ;
 
-- Create a Database Mail profile
EXECUTE msdb.dbo.sysmail_add_profile_sp
    @profile_name = 'AdventureWorks Administrator Profile',
    @description = 'Profile used for administrative mail.' ;
 
-- Add the account to the profile
EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
    @profile_name = 'AdventureWorks Administrator Profile',
    @account_name = 'AdventureWorks Administrator',
    @sequence_number =1 ;
 
-- Grant access to the profile to the DBMailUsers role
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
    @profile_name = 'AdventureWorks Administrator Profile',
    @principal_name = 'ApplicationUser',
    @is_default = 1 ;

Open in new window

Avatar of GeniusSteals
GeniusSteals

ASKER

Though I set up the account/profile using the Wizard rather than by script, I think all those points are taken into account.

I have attached a view of the Wizard when trying to configure the account.

Everything looks to be set up correctly. I'm wondering whether the problem may lie outside of Database Mail and with Outlook.


MailboxSetup.JPG
Yes, could be - The setup does look OK, so might be something interesting with that address... I mean there is the obvious question that it@mycompany.co.uk is set up in your exchange server...   and all the interesting bit are crossed out ;)

But, on further experimentation, configuration, and testing, the reply_to does not work.

Have checked with a couple of colleagues and they concur - only one way, put the reply to address in the "E-MAIL"  it does not even check if it is real - I had santa.clause@northpole.cold and put in a display name of Hppy Holidays and sure enough it came through. My inbox just showed the display name, and the e-mail had display Name and the bogus address, did a reply and it bounced.

So, the reply to is no go, use the e-mail address as the reply to
apologies was not northpole.cold - that one failed, but my own site has a catchall account and second one did come through as santa.clause@myaccount.com

the rest is quite true and accurate...
Closing question as not resolved
Ummm, you might not have liked my answer but it is the real answer. The reply to is no go, use the e-mail address as the reply to.
Thanks but that is not the real answer.  That is just saying that the reply-to doesn't work.  I already noticed that which is why I posted the question...

Either there is a way for the Reply-to to function correctly or something needs to be done in Exchange to facilitate it.  

I need the Reply-to email address to be different from the Email address and it looks like SQL Server provides a way of doing this.

Apparently not...
ASKER CERTIFIED SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia 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
or if testing and have outlook with admin access go into outlook tools, e-mail accounts, select the account, change, more settings, first tab has a reply to down the bottom.