But if you want to do it with a bit of T-SQL, why not?
@profile_name='H2SO4', -- whatever the mail profile is called
@body='If you can read this email, your database mail is working';
If you find that message in your inbox, well done, go and have a nice cup of tea.
Check out your Junk / Deleted Items folders – I did a lot of troubleshooting today, as emails were being caught by a Junk rule and being automatically moved to my Junk folder. If you have set up rules to send automated messages to a folder, check there too.
Add this little bit of code before the above script and try again.
WRONG Check out how to do it here
- Right click on "SQL Server Agent"
- Then "Properties".
- Then go to "Alert System" section.
- Tick the "Enable mail profile" box.
- Then "OK".
- MUST do - Restart the SQL Server Agent service.