• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class SendTokenizedBulkEmail

SendTokenizedBulkEmail Class is a class to manage the sending of bulk mails that contains tokens, which might be replaced with individual user properties.

Inheritance
System.Object
SendTokenizedBulkEmail
Namespace: DotNetNuke.Services.Mail
Assembly: DotNetNuke.dll
Syntax
public class SendTokenizedBulkEmail : IDisposable

Constructors

| Improve this Doc View Source

SendTokenizedBulkEmail()

Initializes a new instance of the SendTokenizedBulkEmail class.

Declaration
public SendTokenizedBulkEmail()
| Improve this Doc View Source

SendTokenizedBulkEmail(List<String>, List<UserInfo>, Boolean, String, String)

Initializes a new instance of the SendTokenizedBulkEmail class.

Declaration
public SendTokenizedBulkEmail(List<string> addressedRoles, List<UserInfo> addressedUsers, bool removeDuplicates, string subject, string body)
Parameters
Type Name Description
List<System.String> addressedRoles
List<UserInfo> addressedUsers
System.Boolean removeDuplicates
System.String subject
System.String body

Properties

| Improve this Doc View Source

AddressMethod

Gets or sets address method for the email to be sent (TO or BCC).

Declaration
public SendTokenizedBulkEmail.AddressMethods AddressMethod { get; set; }
Property Value
Type Description
SendTokenizedBulkEmail.AddressMethods
Remarks

TO is default value.

| Improve this Doc View Source

Body

Gets or sets body text of the email to be sent.

Declaration
public string Body { get; set; }
Property Value
Type Description
System.String
Remarks

may contain HTML tags and tokens. Side effect: sets BodyFormat autmatically.

| Improve this Doc View Source

BodyFormat

Gets or sets format of body text for the email to be sent.

Declaration
public MailFormat BodyFormat { get; set; }
Property Value
Type Description
MailFormat
Remarks

by default activated, if tokens are found in Body and subject.

| Improve this Doc View Source

LanguageFilter

SendTokenizedBulkEmail Class is a class to manage the sending of bulk mails that contains tokens, which might be replaced with individual user properties.

Declaration
public string[] LanguageFilter { get; set; }
Property Value
Type Description
System.String[]
| Improve this Doc View Source

PortalAlias

Gets or sets portal alias http path to be used for links to images, ...

Declaration
public string PortalAlias { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Priority

Gets or sets priority of emails to be sent.

Declaration
public MailPriority Priority { get; set; }
Property Value
Type Description
MailPriority
| Improve this Doc View Source

RelayEmailAddress

SendTokenizedBulkEmail Class is a class to manage the sending of bulk mails that contains tokens, which might be replaced with individual user properties.

Declaration
public string RelayEmailAddress { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

RemoveDuplicates

Gets or sets a value indicating whether shall duplicate email addresses be ignored? (default value: false).

Declaration
public bool RemoveDuplicates { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Duplicate Users (e.g. from multiple role selections) will always be ignored.

| Improve this Doc View Source

ReplyTo

Gets or sets email of the user to be shown in the mail as replyTo address.

Declaration
public UserInfo ReplyTo { get; set; }
Property Value
Type Description
UserInfo
Remarks

if not set explicitely, sendingUser will be used.

| Improve this Doc View Source

ReportRecipients

Gets or sets a value indicating whether shall List of recipients appended to confirmation report?.

Declaration
public bool ReportRecipients { get; set; }
Property Value
Type Description
System.Boolean
Remarks

enabled by default.

| Improve this Doc View Source

SendingUser

Gets or sets userInfo of the user sending the mail.

Declaration
public UserInfo SendingUser { get; set; }
Property Value
Type Description
UserInfo
Remarks

if not set explicitely, currentuser will be used.

| Improve this Doc View Source

Subject

Gets or sets subject of the emails to be sent.

Declaration
public string Subject { get; set; }
Property Value
Type Description
System.String
Remarks

may contain tokens.

| Improve this Doc View Source

SuppressTokenReplace

Gets or sets a value indicating whether shall automatic TokenReplace be prohibited?.

Declaration
public bool SuppressTokenReplace { get; set; }
Property Value
Type Description
System.Boolean
Remarks

default value: false.

Methods

| Improve this Doc View Source

AddAddressedRole(String)

Add all members of a role to recipient list.

Declaration
public void AddAddressedRole(string roleName)
Parameters
Type Name Description
System.String roleName

name of a role, whose members shall be added to recipients.

Remarks

emaiol will be used for addressing, other properties might be used for TokenReplace.

| Improve this Doc View Source

AddAddressedUser(UserInfo)

Add a single recipient.

Declaration
public void AddAddressedUser(UserInfo recipient)
Parameters
Type Name Description
UserInfo recipient

userinfo of user to add.

Remarks

emaiol will be used for addressing, other properties might be used for TokenReplace.

| Improve this Doc View Source

AddAttachment(Stream, ContentType)

SendTokenizedBulkEmail Class is a class to manage the sending of bulk mails that contains tokens, which might be replaced with individual user properties.

Declaration
public void AddAttachment(Stream contentStream, ContentType contentType)
Parameters
Type Name Description
Stream contentStream
ContentType contentType
| Improve this Doc View Source

AddAttachment(String)

Add a single attachment file to the email.

Declaration
public void AddAttachment(string localPath)
Parameters
Type Name Description
System.String localPath

path to file to attach.

Remarks

only local stored files can be added with a path.

| Improve this Doc View Source

Dispose()

SendTokenizedBulkEmail Class is a class to manage the sending of bulk mails that contains tokens, which might be replaced with individual user properties.

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

SendTokenizedBulkEmail Class is a class to manage the sending of bulk mails that contains tokens, which might be replaced with individual user properties.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
| Improve this Doc View Source

Finalize()

Finalizes an instance of the SendTokenizedBulkEmail class.

Declaration
protected void Finalize()
| Improve this Doc View Source

Recipients()

All bulk mail recipients, derived from role names and individual adressees.

Declaration
public List<UserInfo> Recipients()
Returns
Type Description
List<UserInfo>

List of userInfo objects, who receive the bulk mail.

Remarks

user.Email used for sending, other properties might be used for TokenReplace.

| Improve this Doc View Source

Send()

Wrapper for Function SendMails.

Declaration
public void Send()
| Improve this Doc View Source

SendMails()

Send bulkmail to all recipients according to settings.

Declaration
public int SendMails()
Returns
Type Description
System.Int32

Number of emails sent, null.integer if not determinable.

Remarks

Detailed status report is sent by email to sending user.

| Improve this Doc View Source

SetSMTPServer(String, String, String, String, Boolean)

Specify SMTP server to be used.

Declaration
public bool SetSMTPServer(string smtpServer, string smtpAuthentication, string smtpUsername, string smtpPassword, bool smtpEnableSSL)
Parameters
Type Name Description
System.String smtpServer

name of the SMTP server.

System.String smtpAuthentication

authentication string (0: anonymous, 1: basic, 2: NTLM).

System.String smtpUsername

username to log in SMTP server.

System.String smtpPassword

password to log in SMTP server.

System.Boolean smtpEnableSSL

SSL used to connect tp SMTP server.

Returns
Type Description
System.Boolean

always true.

Remarks

if not called, values will be taken from host settings.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS