C# Class Rock.Communication.Transport.SMTPComponent

Sends a communication through SMTP protocol
Inheritance: TransportComponent
Show file Open project: NewSpring/Rock

Public Methods

Method Description
AddAdditionalHeaders ( MailMessage message, string>.Dictionary headers ) : void

Adds any additional headers.

Send ( string>.Dictionary mediumData, List recipients, string appRoot, string themeRoot ) : void

Sends the specified medium data to the specified list of recipients.

Send ( string>.Dictionary mediumData, List recipients, string appRoot, string themeRoot, bool createCommunicationHistory ) : void

Sends the specified medium data to the specified list of recipients.

Send ( string>.Dictionary mediumData, List recipients, string appRoot, string themeRoot, bool createCommunicationHistory, string>.Dictionary metaData ) : void

Sends the specified medium data to the specified list of recipients.

Send ( List recipients, string from, string subject, string body, string appRoot = null, string themeRoot = null ) : void

Sends the specified recipients.

Send ( List recipients, string from, string subject, string body, string appRoot = null, string themeRoot = null, List attachments = null ) : void

Sends the specified recipients.

Send ( List recipients, string from, string fromName, string subject, string body, string appRoot = null, string themeRoot = null, List attachments = null ) : void

Sends the specified recipients.

Send ( List recipients, string from, string fromName, string subject, string body, string appRoot, string themeRoot, List attachments, bool createCommunicationHistory ) : void

Sends the specified recipients.

Send ( Rock communication ) : void

Sends the specified communication.

Send ( SystemEmail template, List recipients, string appRoot, string themeRoot ) : void

Sends the specified template.

Send ( SystemEmail template, List recipients, string appRoot, string themeRoot, bool createCommunicationHistory ) : void

Sends the specified template.

Private Methods

Method Description
CheckSafeSender ( MailMessage message, GlobalAttributesCache globalAttributes ) : void

Checks to make sure the sender's email address domain is one from the SystemGuid.DefinedType.COMMUNICATION_SAFE_SENDER_DOMAINS. If it is not it will replace the From address with the one defined by the OrganizationEmail global attribute.

GetSmtpClient ( ) : SmtpClient

Creates an SmtpClient using this Server, Port and SSL settings.

SplitRecipient ( string recipients ) : List

Splits (on a comma) the string into a List of recipients.

Method Details

AddAdditionalHeaders() public method

Adds any additional headers.
public AddAdditionalHeaders ( MailMessage message, string>.Dictionary headers ) : void
message System.Net.Mail.MailMessage The message.
headers string>.Dictionary The headers.
return void

Send() public method

Sends the specified medium data to the specified list of recipients.
public Send ( string>.Dictionary mediumData, List recipients, string appRoot, string themeRoot ) : void
mediumData string>.Dictionary The medium data.
recipients List The recipients.
appRoot string The application root.
themeRoot string The theme root.
return void

Send() public method

Sends the specified medium data to the specified list of recipients.
public Send ( string>.Dictionary mediumData, List recipients, string appRoot, string themeRoot, bool createCommunicationHistory ) : void
mediumData string>.Dictionary The medium data.
recipients List The recipients.
appRoot string The application root.
themeRoot string The theme root.
createCommunicationHistory bool if set to true [create communication history].
return void

Send() public method

Sends the specified medium data to the specified list of recipients.
public Send ( string>.Dictionary mediumData, List recipients, string appRoot, string themeRoot, bool createCommunicationHistory, string>.Dictionary metaData ) : void
mediumData string>.Dictionary The medium data.
recipients List The recipients.
appRoot string The application root.
themeRoot string The theme root.
createCommunicationHistory bool if set to true [create communication history].
metaData string>.Dictionary The meta data.
return void

Send() public method

Sends the specified recipients.
public Send ( List recipients, string from, string subject, string body, string appRoot = null, string themeRoot = null ) : void
recipients List The recipients.
from string From.
subject string The subject.
body string The body.
appRoot string The application root.
themeRoot string The theme root.
return void

Send() public method

Sends the specified recipients.
public Send ( List recipients, string from, string subject, string body, string appRoot = null, string themeRoot = null, List attachments = null ) : void
recipients List The recipients.
from string From.
subject string The subject.
body string The body.
appRoot string The application root.
themeRoot string The theme root.
attachments List Attachments.
return void

Send() public method

Sends the specified recipients.
public Send ( List recipients, string from, string fromName, string subject, string body, string appRoot = null, string themeRoot = null, List attachments = null ) : void
recipients List The recipients.
from string From.
fromName string From name.
subject string The subject.
body string The body.
appRoot string The application root.
themeRoot string The theme root.
attachments List Attachments.
return void

Send() public method

Sends the specified recipients.
public Send ( List recipients, string from, string fromName, string subject, string body, string appRoot, string themeRoot, List attachments, bool createCommunicationHistory ) : void
recipients List The recipients.
from string From.
fromName string From name.
subject string The subject.
body string The body.
appRoot string The application root.
themeRoot string The theme root.
attachments List Attachments.
createCommunicationHistory bool if set to true [create communication history].
return void

Send() public method

Sends the specified communication.
public Send ( Rock communication ) : void
communication Rock The communication.
return void

Send() public method

Sends the specified template.
public Send ( SystemEmail template, List recipients, string appRoot, string themeRoot ) : void
template SystemEmail The template.
recipients List The recipients.
appRoot string The application root.
themeRoot string The theme root.
return void

Send() public method

Sends the specified template.
public Send ( SystemEmail template, List recipients, string appRoot, string themeRoot, bool createCommunicationHistory ) : void
template SystemEmail The template.
recipients List The recipients.
appRoot string The application root.
themeRoot string The theme root.
createCommunicationHistory bool if set to true [create communication history].
return void