Dynamicweb.EmailMessaging Namespace > MessagingHandler Class > MessagingHandler Constructor : MessagingHandler Constructor(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
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