傳送簡單郵件

此程式碼將一條簡單的純文字電子郵件傳送到 recipient@someaddress.com

EXEC msdb.dbo.sp_send_dbmail  
    @profile_name = 'The Profile Name',  
    @recipients = 'recipient@someaddress.com',  
    @body = 'This is a simple email sent from SQL Server.',  
    @subject = 'Simple email'