Table of Contents

Class AccessUserRecipientProvider

Namespace
Dynamicweb.EmailMarketing.EmailRecipientProviders
Assembly
Dynamicweb.EmailMarketing.dll

Default Dynamicweb recipient provider

[AddInName("Dynamicweb users")]
[AddInUseParameterGrouping(true)]
public class AccessUserRecipientProvider : EmailRecipientProvider, IParameterOptions
Inheritance
AccessUserRecipientProvider
Implements
Inherited Members

Constructors

AccessUserRecipientProvider(IContextAccessor, ActivityService, ConsentService, UserService, UserGroupService, IQueryService)

[ActivatorUtilitiesConstructor]
public AccessUserRecipientProvider(IContextAccessor contextAccessor, ActivityService activityService, ConsentService consentService, UserService userService, UserGroupService userGroupService, IQueryService queryService)

Parameters

contextAccessor IContextAccessor
activityService ActivityService
consentService ConsentService
userService UserService
userGroupService UserGroupService
queryService IQueryService

Properties

DisregardEmailAllowed

A boolean value that indicates whether to disregard the email allowed setting

[AddInParameter("DisregardEmailAllowed")]
[AddInLabel("Disregard email allowed")]
[AddInParameterGroup("Data Processing")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "infoText=If set, users that do not have email allowed set, will still receive email")]
public bool DisregardEmailAllowed { get; set; }

Property Value

bool

Remarks

Setting this flag to true will allow users that do not have email allowed set to receive emails.

DisregardUserActiveState

A boolean value that indicates whether to disregard the user active setting

[AddInParameter("DisregardUserActiveState ")]
[AddInLabel("Include inactive users")]
[AddInParameterGroup("Data Processing")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "infoText=If set, users that are not active, will still receive email")]
public bool DisregardUserActiveState { get; set; }

Property Value

bool

Remarks

Setting this flag to true will allow users that is not active set to receive emails.

EmailAllowedConsentActivity

Email allowed consent activity

[AddInParameter("EmailAllowedConsentActivity")]
[AddInLabel("Ensure consent is given")]
[AddInParameterGroup("Data Processing")]
[AddInParameterEditor(typeof(CheckListParameterEditor), "separatelines=true;width=170;infoText=A recipient must have given consent to at least one of the selected activities.")]
public string? EmailAllowedConsentActivity { get; set; }

Property Value

string

String value

ExcludedUsers

Gets or sets the excluded users.

[AddInParameter("ExcludedUsers")]
public string? ExcludedUsers { get; set; }

Property Value

string

The excluded users.

IncludedUsers

Gets or sets the included users.

[AddInParameter("IncludedUsers")]
public string? IncludedUsers { get; set; }

Property Value

string

The included users.

IsEmailConsentRequired

public bool IsEmailConsentRequired { get; }

Property Value

bool

SmartSearchId

Gets or sets the smart search Id.

[AddInParameter("SmartSearchId")]
public string? SmartSearchId { get; set; }

Property Value

string

String value

UnsubscribeCustomFields

Unsubscribe custom fields

[AddInParameter("UnsubscribeCustomFields")]
[AddInLabel("Uncheck these custom fields")]
[AddInParameterGroup("On unsubscribe")]
[AddInParameterEditor(typeof(CheckListParameterEditor), "separatelines=true;width=170")]
public string? UnsubscribeCustomFields { get; set; }

Property Value

string

String value

UnsubscribeEmailAllowed

Uncheck Email allowed

[AddInParameter("UnsubscribeEmailAllowed")]
[AddInLabel("Uncheck Email allowed")]
[AddInParameterGroup("On unsubscribe")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool UnsubscribeEmailAllowed { get; set; }

Property Value

bool

Boolean value

UnsubscribeRemoveGroups

Remove user from this group

[AddInParameter("UnsubscribeRemoveGroups")]
[AddInLabel("Remove user from this group")]
[AddInParameterGroup("On unsubscribe")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "none=true")]
public string? UnsubscribeRemoveGroups { get; set; }

Property Value

string

String value

UnsubscribeWithdrawConsentToActivity

Email allowed consent activity

[AddInParameter("UnsubscribeWithdrawConsentToActivity")]
[AddInLabel("Withdraw consent to these activities")]
[AddInParameterGroup("On unsubscribe")]
[AddInParameterEditor(typeof(CheckListParameterEditor), "separatelines=true;width=170")]
public string? UnsubscribeWithdrawConsentToActivity { get; set; }

Property Value

string

String value

Methods

ExcludeRecipient(string)

Excludes the recipient.

public void ExcludeRecipient(string recipientKey)

Parameters

recipientKey string

The recipient key.

GetExcludedIds()

Gets the excluded ids.

public List<string> GetExcludedIds()

Returns

List<string>

List of excluded ids.

GetIds()

Gets the ids.

public List<string> GetIds()

Returns

List<string>

List of ids.

GetParameterOptions(string)

public IEnumerable<ParameterOption> GetParameterOptions(string parameterName)

Parameters

parameterName string

Returns

IEnumerable<ParameterOption>

GetRecipientContentContext(Recipient)

Gets context of recipient content

public override PageViewContext GetRecipientContentContext(Recipient recipient)

Parameters

recipient Recipient

Recipient object instance

Returns

PageViewContext

Page view context

GetRecipients()

Gets the recipients.

public override RecipientCollection GetRecipients()

Returns

RecipientCollection

GetRecipients(bool)

Gets the recipients.

public RecipientCollection GetRecipients(bool excluded)

Parameters

excluded bool

if set to true [excluded].

Returns

RecipientCollection

SetExcludedIds(List<string>)

Sets the excluded ids.

public void SetExcludedIds(List<string> recipients)

Parameters

recipients List<string>

The list of excluded recipients.

SetIds(List<string>)

Sets the ids.

public void SetIds(List<string> recipients)

Parameters

recipients List<string>

The list of recipients.

SetTags(Recipient, User)

Sets email tags for specific user

public static void SetTags(Recipient recipient, User user)

Parameters

recipient Recipient

Recipient object instance

user User

User object instance

UnsubscribeRecipient(Recipient)

Unsubscribes the recipient.

public override void UnsubscribeRecipient(Recipient recipient)

Parameters

recipient Recipient

The recipient.

UnsubscribeRecipientByEmailAllowed(Recipient)

Unsubscribes recipient from newsletters

public void UnsubscribeRecipientByEmailAllowed(Recipient recipient)

Parameters

recipient Recipient

Recipient to be unsubscribed

To top