Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a profile called GPMail, and previously there was an account called, which was working as expected.

Now I want one more account with the same site, so instead of creating new profile I created new account called inside the same profile. But now when I try to send mail for password, I do not get the option for the account in the stored procedure -- sp_send_dbmail, so whenever I send the mail, the from field has the address instead of

Is there anyway that I can specify the account name too with Profile name while sending mails?

share|improve this question

migrated from Jan 27 '12 at 21:29

This question came from our site for professional and enthusiast programmers.

@Abbas, I added more to my response below. – samsmith Jan 30 '12 at 1:58

Depending on the method you use for sending mail: Yes

If you use sp_send_dbmail (which is what I use), then yes, you can set the FROM address in the call to send mail.

See docs:

@from_address is what you want, I believe

If you want to actually log in to the mail server as a diff user, then you need to mod the profile or create a new one. The auth to the mail server is configured in the profile.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.