Dynamicweb 8 Documentation
MessagingHandler Constructor(Message)
Example 

The Message to handle.
Creates a new instance of the messaging handler. This constructor should only be used when a send process is resumed.
Syntax
'Declaration
 
Public Function New( _ 
   ByVal message As Message _ 
)
public MessagingHandler( 
   Message message 
)

Parameters

message
The Message to handle.
Example
Resuming a messageResuming a message
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dynamicweb.Examples.CSharp.EmailMessaging
{
    class ResumeMessageSample
    {
        public void ResumeMessage()
        {
            //Assume them message with id 20 has already been sent, 
            //but the send process failed somewhere through the process.
            //This code will resume the send process for the given message.

            //Get the message with id 20.
            var message = Dynamicweb.EmailMessaging.Message.GetMessageById(20);

            //Create a new message handler
            var handler = new Dynamicweb.EmailMessaging.MessagingHandler(message);

            //Resume the message.
            var processResumed = handler.ResumeProcess();

            if (!processResumed)
                throw new Exception("Unable to resume send process");
        }
    }
}
Public Class ResumeMessageSample

    Public Sub ResumeMessage()
        'Assume them message with id 20 has already been sent, 
        'but the send process failed somewhere through the process.
        'This code will resume the send process for the given message.

        'Get the message with id 20.
        Dim message As Global.Dynamicweb.EmailMessaging.Message = Global.Dynamicweb.EmailMessaging.Message.GetMessageById(20)

        'Create a new message handler
        Dim handler As New Global.Dynamicweb.EmailMessaging.MessagingHandler(message)

        'Resume the message.
        Dim processResumed = handler.ResumeProcess()

        If Not processResumed Then
            Throw New Exception("Unable to resume send process")
        End If
    End Sub
End Class
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

MessagingHandler Class
MessagingHandler Members
Overload List

Send Feedback