Class EmailInfoUtils
- Namespace
- CMS.EmailEngine
- Assembly
- CMS.EmailEngine.dll
Contains utility methods for EmailInfo management.
public static class EmailInfoUtils
- Inheritance
-
objectEmailInfoUtils
Methods
BindAttachment(int, string, string, string, int, byte[], string, Guid, DateTime)
Add attachment to specified e-mail and return its ID.
public static int BindAttachment(int emailId, string name, string extension, string mimetype, int size, byte[] binary, string contentId, Guid guid, DateTime lastModified)
Parameters
emailIdintE-mail
namestringAttachment name
extensionstringAttachment extension
mimetypestringAttachment type
sizeintSize of the attachment
binarybyte[]Binary data
contentIdstringAttachment content ID
guidGuidAttachment GUID
lastModifiedDateTimeLast modification date of the attachment
Returns
- int
DeleteArchived(DateTime, int)
Deletes expired archived e-mails. Size of deleted "batch" is specified by batchSize.
public static int DeleteArchived(DateTime expirationDate, int batchSize)
Parameters
expirationDateDateTimeEvery archived email older that expiration date will be deleted
batchSizeintNumber of emails to be deleted at once
Returns
- int
Returns number of deleted emails.
Resend(IEnumerable<int>, CancellationToken)
Re-sends e-mails specified by their IDs. If some of the specified emails are already being sent, they are NOT send again.
public static Task Resend(IEnumerable<int> ids, CancellationToken cancellationToken)
Parameters
idsIEnumerable<int>IDs of the emails that are to be sent
cancellationTokenCancellationTokenCancellation token.
Returns
- Task