Represents an email within the Interaction Center system.

Namespace: ININ.IceLib.Interactions
Assembly: ININ.IceLib.Interactions (in ININ.IceLib.Interactions.dll) Version: 0.0.0.0 (22.3.0.218)

Syntax

C#
public class EmailInteraction : Interaction
Visual Basic
Public Class EmailInteraction _
	Inherits Interaction

Remarks

This class can be used to start and stop watches on an email interaction along with downloading, uploading, and deleting attachments, and sending email messages.

To start a watch, call EmailStartWatching()()()() or EmailStartWatchingAsync(AsyncCompletedEventHandler, Object). When the email start watch operation completes it invokes the completedCallback delegate. To stop watching an email interaction call EmailStopWatching()()()() or EmailStopWatchingAsync(AsyncCompletedEventHandler, Object). When the email stop watch operation completes it invokes the completedCallback delegate.

To create a new email, call MakeEmail(EmailInteractionParameters).

To create a response to this email, call CreateResponse(EmailContent, EmailResponseType) or CreateResponse(EmailContent, EmailResponseType) with an EmailContent object. To create an EmailContent object for response, use the source content's CloneForResponse(EmailCloneAttachmentType). When the asynchronous set response operation completes it invokes the completedCallback delegate.

To download a file attachment from the server call DownloadFileAttachment(EmailFileAttachment, Stream) or DownloadFileAttachmentAsync(EmailFileAttachment, Stream, AsyncCompletedEventHandler, Object) providing an EmailFileAttachment object and a local path to save the attachment. When the asynchronous download attachment operation completes it invokes the completedCallback delegate.

To download a message attachment from the server call DownloadMessageAttachment(EmailMessageAttachment) or DownloadMessageAttachmentAsync(EmailMessageAttachment, EventHandler<(Of <<'(EmailDownloadMessageAttachmentCompletedEventArgs>)>>), Object) providing an EmailMessageAttachment object. When the asynchronous download attachment operation completes it invokes the completedCallback delegate.

To upload a file attachment to the server call UploadFileAttachment(String) or UploadFileAttachmentAsync(String, AsyncCompletedEventHandler, Object) providing a file name of the attachment to upload. When the asynchronous upload operation completes it invokes the completedCallback delegate.

To upload an inline file attachment to the server call UploadFileAttachment(String, String) or UploadFileAttachmentAsync(String, String, AsyncCompletedEventHandler, Object) providing a file name of the attachment to upload and the Content-ID used to identify the attachment within the HTML body of the email. Use GenerateContentId(String) to create a unique Content-ID that can be used when uploading the given file as an inline attachment.

To remove a file attachment call RemoveFileAttachment(EmailFileAttachment) or RemoveFileAttachmentAsync(EmailFileAttachment, AsyncCompletedEventHandler, Object) with an EmailFileAttachment object to be removed. When the asynchronous operation completes it invokes the completedCallback delegate.

To send an email, call SendEmail()()()() or SendEmailAsync(AsyncCompletedEventHandler, Object). When the asynchronous send operation completes it invokes the completedCallback delegate.

Calling EmailStartWatching()()()() or EmailStartWatchingAsync(AsyncCompletedEventHandler, Object) when a watch is already in place, or calling EmailStopWatching()()()() or EmailStopWatchingAsync(AsyncCompletedEventHandler, Object) when a watch is not in place raises and InvalidOperationException.

Note
The asynchronous version of these methods is preferred since these operations can be lengthy.
Note
This class has been updated for 4.0 to replace the EmailResponse with EmailContent with expanded functionality.

Inheritance Hierarchy

System..::..Object
  ININ.IceLib.Interactions..::..Interaction
    ININ.IceLib.Interactions..::..EmailInteraction

Version Information

Supported for IC Server version 2015 R1 and beyond.
For 4.0, supported for IC Server version 4.0 GA and beyond.
For 3.0, supported for IC Server version 3.0 GA and beyond.

See Also