<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sysmail_account on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/sysmail_account/</link><description>Recent content in Sysmail_account on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Wed, 01 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/sysmail_account/index.xml" rel="self" type="application/rss+xml"/><item><title>Configure Database Mail and Send a Test Message</title><link>https://www.sqlserver70.com/post/sql-server-database-mail-configuration-and-test-script/</link><pubDate>Wed, 01 Jul 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-database-mail-configuration-and-test-script/</guid><description>
&lt;p&gt;Database Mail ships disabled; enabling it and wiring up an SMTP account, a profile, and a public principal grant are the steps that stand between a fresh SQL Server instance and &lt;code&gt;sp_send_dbmail&lt;/code&gt; working reliably. The configuration script below executes all four setup calls inside &lt;code&gt;msdb&lt;/code&gt;, fires a test message, and queries &lt;code&gt;msdb.dbo.sysmail_event_log&lt;/code&gt; to confirm the message reached the SMTP relay — all in one repeatable script.&lt;/p&gt;
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="8593449130"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;h2 id="purpose-and-overview"&gt;Purpose and Overview&lt;/h2&gt;
&lt;p&gt;Sending email from SQL Server — for Agent job failures, custom monitoring alerts, or ad hoc DBA notifications — runs through a single pathway: an SMTP account registered in &lt;code&gt;msdb&lt;/code&gt;, wrapped in a named profile, and exposed to the Database Mail service via a principal-profile grant. When any of those three links is missing or misconfigured, &lt;code&gt;sp_send_dbmail&lt;/code&gt; accepts the call and silently queues the message, but the mail never leaves the server. The only diagnostic path is &lt;code&gt;msdb.dbo.sysmail_event_log&lt;/code&gt;.&lt;/p&gt;</description></item></channel></rss>