send_dbmail
-- Send database mail. | |
DECLARE @get_date DATETIME = GETDATE() | |
DECLARE @body_text VARCHAR(MAX) | |
= 'This email was sent from SQL Sever at ' | |
+ CAST(@get_date AS VARCHAR) | |
+ ' .' | |
EXEC msdb.dbo.sp_send_dbmail | |
@profile_name = 'local', | |
@recipients = 'email@outlook.co.uk', | |
@subject = 'This is a test email.' , | |
@importance = 'Low', | |
@body = @body_text, | |
@body_format = 'Text' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment