Table of Contents

Class CPEmailBaseClass

Namespace
Contensive.BaseClasses
Assembly
CPBase.dll

Methods to send and manage email.

public abstract class CPEmailBaseClass
Inheritance
CPEmailBaseClass
Inherited Members

Properties

fromAddressDefault

Returns the site's default email from address

public abstract string fromAddressDefault { get; }

Property Value

string

Methods

send(string, string, string, string)

Sends an email to an email address. Return false if the email could not be sent

public abstract void send(string toAddress, string fromAddress, string subject, string body)

Parameters

toAddress string
fromAddress string
subject string
body string

send(string, string, string, string, bool)

Sends an email to an email address. Return false if the email could not be sent

public abstract void send(string toAddress, string fromAddress, string subject, string body, bool sendImmediately)

Parameters

toAddress string
fromAddress string
subject string
body string
sendImmediately bool

send(string, string, string, string, bool, bool)

Sends an email to an email address. Return false if the email could not be sent

public abstract void send(string toAddress, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML)

Parameters

toAddress string
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool

send(string, string, string, string, bool, bool, ref string)

Sends an email to an email address. Return false if the email could not be sent

public abstract void send(string toAddress, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML, ref string adminErrorMessage)

Parameters

toAddress string
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendForm(string, string, string)

Sends an email that includes all the form elements in the current webpage response.

public abstract void sendForm(string toAddress, string fromAddress, string subject)

Parameters

toAddress string
fromAddress string
subject string

sendForm(string, string, string, ref string)

Sends an email that includes all the form elements in the current webpage response.

public abstract void sendForm(string toAddress, string fromAddress, string subject, ref string adminErrorMessage)

Parameters

toAddress string
fromAddress string
subject string
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendGroup(List<int>, string, string, string)

Sends an email to everyone in a list of groups.

public abstract void sendGroup(List<int> groupIdList, string fromAddress, string subject, string body)

Parameters

groupIdList List<int>
fromAddress string
subject string
body string

sendGroup(List<int>, string, string, string, bool)

Sends an email to everyone in a list of groups.

public abstract void sendGroup(List<int> groupIdList, string fromAddress, string subject, string body, bool sendImmediately)

Parameters

groupIdList List<int>
fromAddress string
subject string
body string
sendImmediately bool

sendGroup(List<int>, string, string, string, bool, bool)

Sends an email to everyone in a list of groups.

public abstract void sendGroup(List<int> groupIdList, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML)

Parameters

groupIdList List<int>
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool

sendGroup(List<int>, string, string, string, bool, bool, ref string)

Sends an email to everyone in a list of groups.

public abstract void sendGroup(List<int> groupIdList, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML, ref string adminErrorMessage)

Parameters

groupIdList List<int>
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendGroup(List<string>, string, string, string)

Sends an email to everyone in a list of groups.

public abstract void sendGroup(List<string> groupNameList, string fromAddress, string subject, string body)

Parameters

groupNameList List<string>
fromAddress string
subject string
body string

sendGroup(List<string>, string, string, string, bool)

Sends an email to everyone in a list of groups.

public abstract void sendGroup(List<string> groupNameList, string fromAddress, string subject, string body, bool sendImmediately)

Parameters

groupNameList List<string>
fromAddress string
subject string
body string
sendImmediately bool

sendGroup(List<string>, string, string, string, bool, bool)

Sends an email to everyone in a list of groups.

public abstract void sendGroup(List<string> groupNameList, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML)

Parameters

groupNameList List<string>
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool

sendGroup(List<string>, string, string, string, bool, bool, ref string)

Sends an email to everyone in a list of groups.

public abstract void sendGroup(List<string> groupNameList, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML, ref string adminErrorMessage)

Parameters

groupNameList List<string>
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendGroup(int, string, string, string)

Sends an email to everyone in a group.

public abstract void sendGroup(int groupId, string fromAddress, string subject, string body)

Parameters

groupId int
fromAddress string
subject string
body string

sendGroup(int, string, string, string, bool)

Sends an email to everyone in a group.

public abstract void sendGroup(int groupId, string fromAddress, string subject, string body, bool sendImmediately)

Parameters

groupId int
fromAddress string
subject string
body string
sendImmediately bool

sendGroup(int, string, string, string, bool, bool)

Sends an email to everyone in a group.

public abstract void sendGroup(int groupId, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML)

Parameters

groupId int
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool

sendGroup(int, string, string, string, bool, bool, ref string)

Sends an email to everyone in a group.

public abstract void sendGroup(int groupId, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML, ref string adminErrorMessage)

Parameters

groupId int
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendGroup(string, string, string, string)

Sends an email to everyone in a group. (legacy support: if groupName is a valid guid it is assumed to be)

public abstract void sendGroup(string groupName, string fromAddress, string subject, string body)

Parameters

groupName string
fromAddress string
subject string
body string

sendGroup(string, string, string, string, bool)

Sends an email to everyone in a group. (legacy support: if groupName is a valid guid it is assumed to be)

public abstract void sendGroup(string groupName, string fromAddress, string subject, string body, bool sendImmediately)

Parameters

groupName string
fromAddress string
subject string
body string
sendImmediately bool

sendGroup(string, string, string, string, bool, bool)

Sends an email to everyone in a group. (legacy support: if groupName is a valid guid it is assumed to be)

public abstract void sendGroup(string groupName, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML)

Parameters

groupName string
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool

sendGroup(string, string, string, string, bool, bool, ref string)

Sends an email to everyone in a group. (legacy support: if groupName is a valid guid it is assumed to be)

public abstract void sendGroup(string groupName, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML, ref string adminErrorMessage)

Parameters

groupName string
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendPassword(string)

Send a list of usernames and passwords to the account(s) that include the given email address. If false, the email could not be sent.

public abstract void sendPassword(string userEmailAddress)

Parameters

userEmailAddress string

sendPassword(string, ref string)

Send a list of usernames and passwords to the account(s) that include the given email address. If false, the email could not be sent.

public abstract void sendPassword(string userEmailAddress, ref string adminErrorMessage)

Parameters

userEmailAddress string
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendSystem(int)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(int emailId)

Parameters

emailId int

sendSystem(int, bool)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(int emailId, bool sendImmediately)

Parameters

emailId int
sendImmediately bool

sendSystem(int, string)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(int emailId, string additionalCopy)

Parameters

emailId int
additionalCopy string

sendSystem(int, string, bool)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(int emailId, string additionalCopy, bool sendImmediately)

Parameters

emailId int
additionalCopy string
sendImmediately bool

sendSystem(int, string, int)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(int emailId, string additionalCopy, int additionalUserID)

Parameters

emailId int
additionalCopy string
additionalUserID int

sendSystem(int, string, int, bool)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(int emailId, string additionalCopy, int additionalUserID, bool sendImmediately)

Parameters

emailId int
additionalCopy string
additionalUserID int
sendImmediately bool

sendSystem(int, string, int, ref string)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(int emailId, string additionalCopy, int additionalUserID, ref string adminErrorMessage)

Parameters

emailId int
additionalCopy string
additionalUserID int
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendSystem(int, string, int, ref string, bool)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(int emailId, string additionalCopy, int additionalUserID, ref string adminErrorMessage, bool sendImmediately)

Parameters

emailId int
additionalCopy string
additionalUserID int
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendImmediately bool

sendSystem(string)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(string emailName)

Parameters

emailName string

sendSystem(string, bool)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(string emailName, bool sendImmediately)

Parameters

emailName string
sendImmediately bool

sendSystem(string, string)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(string emailName, string additionalCopy)

Parameters

emailName string
additionalCopy string

sendSystem(string, string, bool)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(string emailName, string additionalCopy, bool sendImmediately)

Parameters

emailName string
additionalCopy string
sendImmediately bool

sendSystem(string, string, int)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(string emailName, string additionalCopy, int additionalUserID)

Parameters

emailName string
additionalCopy string
additionalUserID int

sendSystem(string, string, int, bool)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(string emailName, string additionalCopy, int additionalUserID, bool sendImmediately)

Parameters

emailName string
additionalCopy string
additionalUserID int
sendImmediately bool

sendSystem(string, string, int, ref string)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(string emailName, string additionalCopy, int additionalUserID, ref string adminErrorMessage)

Parameters

emailName string
additionalCopy string
additionalUserID int
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendSystem(string, string, int, ref string, bool)

Send a system email record. If the EmailIdOrName field contains a number, it is assumed first to be an Id. If false, the email could not be sent

public abstract void sendSystem(string emailName, string additionalCopy, int additionalUserID, ref string adminErrorMessage, bool sendImmediately)

Parameters

emailName string
additionalCopy string
additionalUserID int
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendImmediately bool

sendUser(int, string, string, string)

Send an email a user.

public abstract void sendUser(int toUserId, string fromAddress, string subject, string body)

Parameters

toUserId int
fromAddress string
subject string
body string

sendUser(int, string, string, string, bool)

Send an email a user.

public abstract void sendUser(int toUserId, string fromAddress, string subject, string body, bool sendImmediately)

Parameters

toUserId int
fromAddress string
subject string
body string
sendImmediately bool

sendUser(int, string, string, string, bool, bool)

Send an email a user.

public abstract void sendUser(int toUserId, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML)

Parameters

toUserId int
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool

sendUser(int, string, string, string, bool, bool, ref string)

Send an email a user.

public abstract void sendUser(int toUserId, string fromAddress, string subject, string body, bool sendImmediately, bool bodyIsHTML, ref string adminErrorMessage)

Parameters

toUserId int
fromAddress string
subject string
body string
sendImmediately bool
bodyIsHTML bool
adminErrorMessage string

If not empty, this is an error message appropriate for an administrator, not a public user.

sendUser(string, string, string, string)

use setUser with argument int toUserId

[Obsolete("use setUser with argument int toUserId", false)]
public abstract void sendUser(string ToUserID, string FromAddress, string Subject, string Body)

Parameters

ToUserID string
FromAddress string
Subject string
Body string

sendUser(string, string, string, string, bool)

use setUser with argument int toUserId

[Obsolete("use setUser with argument int toUserId", false)]
public abstract void sendUser(string ToUserID, string FromAddress, string Subject, string Body, bool SendImmediately)

Parameters

ToUserID string
FromAddress string
Subject string
Body string
SendImmediately bool

sendUser(string, string, string, string, bool, bool)

use setUser with argument int toUserId

[Obsolete("use setUser with argument int toUserId", false)]
public abstract void sendUser(string ToUserID, string FromAddress, string Subject, string Body, bool SendImmediately, bool BodyIsHTML)

Parameters

ToUserID string
FromAddress string
Subject string
Body string
SendImmediately bool
BodyIsHTML bool

validateEmail(string)

validate an email address (just check if it is a valid format) Returns true if email is valid, false if invalid.

public abstract bool validateEmail(string toAddress)

Parameters

toAddress string

Returns

bool

validateUserEmail(int)

validate a user's email address. Returns true if the user has a valid email address, else returns false.

public abstract bool validateUserEmail(int toUserId)

Parameters

toUserId int

Returns

bool