Click or drag to resize
EmailHelper Class
E-mail utility methods.
Inheritance Hierarchy
SystemObject
  CMS.EmailEngineEmailHelper

Namespace: CMS.EmailEngine
Assembly: CMS.EmailEngine (in CMS.EmailEngine.dll) Version: 13.0.131
Syntax
C#
public static class EmailHelper

The EmailHelper type exposes the following members.

Fields
  NameDescription
Public fieldStatic memberDEFAULT_EMAIL_SENDER
E-mail used as default sender
Top
Properties
  NameDescription
Public propertyStatic memberDebugEmails
Gets if the debug mode is active. Default value is false. If the debug mode is on, the e-mail sending thread sleeps for 500-1000ms instead of actually sending the e-mail. The setting may be changed via web.config app-key "CMSDebugEmails".
Public propertyStatic memberLogEmails
If true, sent e-mails are logged to the file. Default value is false. The setting may be changed via web.config app-key "CMSLogEmails".
Public propertyStatic memberLogFile
Path to the log file if logging is enabled, see LogEmails property.
Public propertyStatic memberSimulateFailedEmails
Gets if the simulation of send failures is active during debug mode (see DebugEmails property). Default value is false. If true, and exception is thrown when trying to send an e-mail. The setting may be changed via web.config app-key "CMSSimulateFailedEmails".
Public propertyStatic memberTransferEncoding
E-mail transfer encoding. Default value is TransferEncoding.Base64. The setting may be changed via web.config app-key "CMSEmailTransferEncoding".
Top
Methods
  NameDescription
Public methodStatic memberGetEmailFormat(Int32)
Gets the e-mail format for the site given its site ID.
Public methodStatic memberGetEmailFormat(String)
Gets the e-mail format for the site given its site name.
Public methodStatic memberGetReplyToEmailAddress
Returns ReplyTo e-mail address from message (internally handles .NET 4.0 backward compatibility).
Public methodStatic memberGetSender
Returns e-mail sender from template, if defined or specified sender.
Public methodStatic memberGetSubject
Returns e-mail subject from template, if defined or default subject.
Public methodStatic memberGetTransferEncoding
Gets the transfer encoding enumeration.
Public methodStatic memberIsAnySendingEnabled
Returns if e-mail sending is enabled in either global or any site settings.
Public methodStatic memberResolveMetaFileImages(EmailMessage, IEnumerableMetaFileInfo)
Appends all attached files to given email. Replaces link 'src="...GetMetaFile.aspx?...fileguid=..."' or 'src=".../GetMetaFile/..." with link to e-mail in-line attachments (only for images).
Public methodStatic memberResolveMetaFileImages(EmailMessage, Int32, String, String)
Appends all attached files to given email. Replaces link 'src="...GetMetaFile.aspx?...fileguid=..."' or 'src=".../GetMetaFile/..." with link to e-mail in-line attachments (only for images).
Public methodStatic memberSetReplyToEmailAddress
Sets ReplyTo e-mail address of the given message (internally handles .NET 4.0 backward compatibility).
Public methodStatic memberToEmailPriority Obsolete.
Converts a MailPriority value to EmailPriorityEnum value.
Public methodStatic memberToMailPriority Obsolete.
Converts a EmailPriorityEnum value to MailPriority value.
Top
See Also