We have been asked to use a domain service account for everything releated to email (smtp). I looked at the SQL Database Mail and the only option that looked like Windows Auth. is the first one:
The problem is that the account we will use will not be the SQL service account.
Is there a way to make it work with a domain service account that is not the SQL Service account ?
Best Answer
Using Database Mail Configuration Wizard
You can achieve that by selecting the Basic authentication option and filling the user name in the
Domain\Login
format:You can check the New Account Page doc to understand each parameter of the wizard.
Using Transact-SQL
You can also use the system stored procedure sysmail_add_account_sp to do that. Here I used the example from the doc and added the last three parameters that are related to your question:
Security Implication
Notice that on both examples I'm using the SSL option because, as Dan Guzman pointed out, the use of that option
as you'll see in the doc. So, if you're not using a secure connection in your environment, those credentials, along with the email content, are gonna be sent in plain text to the SMTP mail server, therefore being a security issue.