Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



dbo.sysmail_logmailevent_sp

  No additional text.


Syntax
-- sysmail_logmailevent_sp : inserts an entry in the sysmail_log table
CREATE PROCEDURE sysmail_logmailevent_sp
    @event_type     INT,
    @description    NVARCHAR(max)   = NULL,
    @process_id     INT             = NULL,
    @mailitem_id    INT             = NULL,
    @account_id     INT             = NULL
AS
    SET NOCOUNT ON

    --Try and get the optional logging level for the DatabaseMail process
    DECLARE @loggingLevel nvarchar(256)
    EXEC msdb.dbo.sysmail_help_configure_value_sp @parameter_name = N'LoggingLevel',
                                                  @parameter_value = @loggingLevel OUTPUT

    DECLARE @loggingLevelInt int
    SET @loggingLevelInt = dbo.ConvertToInt(@loggingLevel, 3, 2)

    IF (@event_type = 3) OR                           -- error
       (@event_type = 2 AND @loggingLevelInt >= 2) OR -- warning with extended logging
       (@event_type = 1 AND @loggingLevelInt >= 2) OR -- info with extended logging
       (@event_type = 0 AND @loggingLevelInt >= 3)    -- success with verbose logging
    BEGIN
       INSERT sysmail_log(event_type, description, process_id, mailitem_id, account_id)
       VALUES(@event_type, @description, @process_id , @mailitem_id, @account_id)
    END
RETURN 0

 
Last revision 2008RTM
See also

  sp_ExternalMailQueueListener (Procedure)
sp_ProcessResponse (Procedure)
sp_process_DialogTimer (Procedure)
sp_readrequest (Procedure)
sp_sysmail_activate (Procedure)
sysmail_delete_mailitems_sp (Procedure)
sysmail_start_sp (Procedure)
sysmail_stop_sp (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash