![]() ![]() You also have the option of providing your own name for the attachment. The name was automatically generated by Database Mail.īy default, the maximum file size for attachments is 1 MB per file, but you can change this with the sysmail_configure_sp stored procedure. This example sends an email with the results attached as a. EXEC = 'DB Admin = ' = 'Potential candidates for an Admin job, = 'SELECT TOP(5) * FROM = 'Query results as discussed' To send the results in an attachment, simply provide a 1 for this argument. This is accepts a bit value, with the default being 0 (for no attachment). To attach those results as an attachment, use the argument. To email the results of a query, use the argument. One of the choices you have when executing this procedure is whether or not to include the results of a query.Īnother choice you have is whether or not to send those results in an attachment. In SQL Server, you can send emails using the sp_send_dbmail stored procedure in the msdb database.
0 Comments
Leave a Reply. |