MadeiraData / sql-clr-ics

Send Calendar Event / Appointment Invitations (iCal formatted file) from within SQL Server using a CLR stored procedure
https://git.madeiradata.com/sql-clr-ics/
MIT License
9 stars 1 forks source link

Refactor parameters to mirror those of sp_send_dbmail #5

Closed EitanBlumin closed 5 years ago

EitanBlumin commented 5 years ago

Need to add missing parameters such as @importance and @sensitivity.

Obviously not all parameters are relevant, and there would be extra parameters beyond those in sp_send_dbmail, but those that are common to both procedures, should be aligned properly.

Also, the order of the parameters must be such so that all mandatory parameters would be in the beginning (right now @subject is mandatory but it's placed after non-mandatory parameters. So either move it to the beginning, or make it non-mandatory as well).

sp_send_dbmail [ [ @profile_name = ] 'profile_name' ]  
    [ , [ @recipients = ] 'recipients [ ; ...n ]' ]  
    [ , [ @copy_recipients = ] 'copy_recipient [ ; ...n ]' ]  
    [ , [ @blind_copy_recipients = ] 'blind_copy_recipient [ ; ...n ]' ]  
    [ , [ @from_address = ] 'from_address' ]  
    [ , [ @reply_to = ] 'reply_to' ]   
    [ , [ @subject = ] 'subject' ]   
    [ , [ @body = ] 'body' ]   
    [ , [ @body_format = ] 'body_format' ]  
    [ , [ @importance = ] 'importance' ]  
    [ , [ @sensitivity = ] 'sensitivity' ]  
    [ , [ @file_attachments = ] 'attachment [ ; ...n ]' ]  
    [ , [ @query = ] 'query' ]  
    [ , [ @execute_query_database = ] 'execute_query_database' ]  
    [ , [ @attach_query_result_as_file = ] attach_query_result_as_file ]  
    [ , [ @query_attachment_filename = ] query_attachment_filename ]  
    [ , [ @query_result_header = ] query_result_header ]  
    [ , [ @query_result_width = ] query_result_width ]  
    [ , [ @query_result_separator = ] 'query_result_separator' ]  
    [ , [ @exclude_query_output = ] exclude_query_output ]  
    [ , [ @append_query_error = ] append_query_error ]  
    [ , [ @query_no_truncate = ] query_no_truncate ]   
    [ , [ @query_result_no_padding = ] @query_result_no_padding ]   
    [ , [ @mailitem_id = ] mailitem_id ] [ OUTPUT ]