Click or drag to resize

MailService Class

The MailService object is a wrapper object around System.Web.Mail that can load it's configuration properties from the repository database or used stand alone.
Inheritance Hierarchy

Namespace:  NetQuarry.Services
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
[SerializableAttribute]
public class MailService : ServiceBase, 
	IEmailService

The MailService type exposes the following members.

Constructors
  NameDescription
Public methodMailService
Constructs a NetQuarry.MailService object.
Top
Properties
  NameDescription
Public propertyApplication
Gets or Sets the IAppContext object for the service.
(Inherited from ServiceBase.)
Public propertyAttributes
Gets/Sets the service attributes.
(Inherited from ServiceBase.)
Public propertyAuthenticationType
Specifies the authentication mechanism to use when authentication is required to send messages to an SMTP service using a TCP/IP network socket.
Public propertyCategory
Gets/Sets the service category.
(Inherited from ServiceBase.)
Public propertyCheckNoSendList
True if the mail service should check outgoing email address against the no send list.
Public propertyComponentID
Gets/Sets the service component ID.
(Inherited from ServiceBase.)
Public propertyDefaultSenderAddress
Gets/Sets the address to use when there is no FROM address supplied in the message.
Public propertyDisabled
True if the mail service is disabled.
Public propertyEmailSendAttributes
Gets/Sets the property to control the 'Sender' property of the email address. The Sender can be different than the From address. If it is, then the message comes FROM the Sender ON BEHALF OF the From address. This can improve results with spam filters.
Public propertyID
Gets/Sets the service ID.
(Inherited from ServiceBase.)
Public propertyIsSendAsync
Returns true if the service delivers mail asynchronously.
Public propertyIsValidConfig
Returns true if the Smtp configuration is valid.
Public propertyName
Gets/Sets the service name.
(Inherited from ServiceBase.)
Public propertyNoSendListCheckDuration
Number of minutes that elapse between automatic refreshing of the no sender list
Public propertyProperties
Gets the service's configuration properties
(Inherited from ServiceBase.)
Public propertySendAsync
True if the mail should be sent using the ThreadPool, otherwise synchronous
Public propertyServiceName
Returns the name of the email service.
Public propertySmtpPassword
The password used to authenticate to an SMTP server using basic (clear-text) authentication.
Public propertySmtpPort
The port on which the SMTP service specified by the smtpserver field is listening for connections.
Public propertySmtpServer
The name of the e-mail relay server. If SmtpServer is not set, the name of the local SMTP server is used.
Public propertySmtpUserName
The username for authenticating to an SMTP server using basic (clear-text) authentication.
Public propertyType
Gets/Sets the service type.
(Inherited from ServiceBase.)
Public propertyUseSSL
True if the SMTP server should use SSL.
Top
Methods
  NameDescription
Public methodClone
Returns a copy of this object
(Inherited from ServiceBase.)
Public methodStatic memberConstructMessage(String, String, String, String, String, String, Boolean, Attachment, SendEmailFlags)
Prepare a message for sending. This is to allow email senders using the safer Send() methods to first get the message in a format suitable for events on a mapper.
Public methodConstructMessage(String, String, String, String, String, String, Boolean, Attachment, SendEmailFlags, String)
Constructs a MailMessage object using the specified destination parameters including optional attachments and Template.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsValidMailConfig
Returns true if the email configuration is correct for the current user
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOnWebhook
Handles an invocation of a "webhook" event for the service. You should implement this event if you want your service to handle webhooks through the standard platform webhook wiring. The raw wiring for the webhook would look like handler.ashx?req=webhook&service=sss&appkey=aaa&token=ttt where sss is the name of the service, aaa is the application key, and ttt is the authentication token. When wired up in the manner, the platform will instantiate an IAppContext object, authenticate the request based on the provided token, obtain an instance of the service from the Services collection, and invoke this method on the service. If the webhook is wired up in this manner, you must override the base implementation of this method or an exception will be thrown.
(Inherited from ServiceBase.)
Public methodSend(MailMessage)
Sends an e-mail message using arguments supplied in the properties of the MailMessageMailMessage class.
Public methodSend(Message)
Sends an e-mail message using arguments supplied in the properties of the MailMessageMailMessage class.
Public methodSend(MailMessage, SendEmailFlags)
Sends an e-mail message using arguments supplied in the properties of the MailMessageMailMessage class.
Public methodSend(MailMessage, SendEmailFlags, String)
Sends an e-mail message using arguments supplied in the properties of the MailMessageMailMessage class.
Public methodSend(String, String, String, String)
Sends a text (not HTML) e-mail message using the specified basic parameters (from, to, subject, messageText).
Public methodSend(String, String, String, String, Boolean)
Sends a text or HTML e-mail message using the specified basic parameters (from, to, subject, messageText).
Public methodSend(String, String, String, String, Boolean, String)
Sends a text or HTML e-mail message using the specified basic parameters (from, to, subject, messageText) and using a Template for the email composition.
Public methodSend(String, String, String, String, String, String, Boolean)
Sends a text or HTML e-mail message using the specified basic parameters (from, to, subject, messageText), with CC and BCC addresses, and using a Template for the email composition.
Public methodSend(String, String, String, String, String, String, Boolean, Attachment)
Sends a text or HTML e-mail message using the specified basic parameters (from, to, subject, messageText), with CC and BCC addresses, and with attachments.
Public methodSend(String, String, String, String, String, String, Boolean, Attachment, SendEmailFlags)
Sends a text or HTML e-mail message using the specified basic parameters (from, to, subject, messageText), with CC and BCC addresses, with attachments, and with SendEmailFlags options.
Public methodSend(String, String, String, String, String, String, Boolean, Attachment, SendEmailFlags, String)
Sends a text or HTML e-mail message using the specified basic parameters (from, to, subject, messageText), with CC and BCC addresses, with attachments, with SendEmailFlags options, and using a Template for the email composition.
Public methodServiceLoaded
Called by the ServiceInfos collection after the service is created
(Inherited from ServiceBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also