Link to home
Start Free TrialLog in
Avatar of romeiovasu
romeiovasu

asked on

sql db email, sql 2005, sql 2008

i have a query written with sql db email

EXEC msdb.dbo.sp_send_dbmail
       @recipients=@customeremail,
       @replyto_address = @storeemail,
     @subject = 'Thank You' ,
     @body = @tableHTML,
     @body_format = 'HTML'

i am getting an error

Msg 8145, Level 16, State 1, Procedure sp_send_dbmail, Line 0
@replyto_address is not a parameter for procedure sp_send_dbmail.


can some onehelp with this.
Avatar of MPKR
MPKR
Flag of Germany image

This parameter is not a valid one. You cant use it. Youmust configure the account to do this.
 
check out this page> http://blogs.msdn.com/b/suhde/archive/2009/07/12/how-to-configure-sql-server-database-mail-to-send-email-using-your-windows-live-mail-account-or-your-gmail-account.aspx
 
Avatar of romeiovasu
romeiovasu

ASKER

but here it shows how to configure live email and gmail.com
ASKER CERTIFIED SOLUTION
Avatar of MPKR
MPKR
Flag of Germany 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
i didnt get it what i was looking for. i have already configured perfectly. all i wanted was to pass variable to reply to address i no it cannot be happend but i was looking some other alternatives.
You can write your own Send_EMAIL Procedure and include a reply_to parameter. Inside of the procedure you must check (SELECT CASE) what value was passed and depending on this value select another SQL DataBase PROFILE from you configuration. Inside of the different configurations (Profiles) select different Accounts (including REPLY TO addresses).