0

I was trying to send mail using Database Mail in Sql Server 2008

It works fine when i use individual profile, but my scenario is different. Here what i want to achieve.

  1. I have a database profile which contains multiple accounts like A, B, C etc...
  2. I want to send mails based on the account but the Profile Name could be same, because all the A,B, C accounts have a different mail id's so i want to use different account.

Can anyone tell me what i can do to send mails using single profile differentiating based on the account name.

Abbas
  • 4,948
  • 31
  • 95
  • 161
  • According to the [documentation](http://technet.microsoft.com/en-us/library/ms189879(v=sql.100).aspx), the purpose of accounts is to provide redundancy by providing multiple accounts for one profile to use. If you want to send an email using a specific account, then you need to create a profile that uses only that account. – Pondlife May 20 '13 at 17:12
  • so according to that, if i have to send mails using different sender mail id for the same site, i have to create different profiles, won't one profile work? – Abbas May 22 '13 at 17:11
  • 1
    Yes, that's correct. When you send an email with `sp_send_dbmail` you can only choose the profile, not the account. If you need better control over sending emails, you might need to write your own service to send the emails. Although it isn't really clear from your question why using different profiles doesn't work for you. – Pondlife May 22 '13 at 18:12

0 Answers0