api/parts/mgmt/mail

This module is meant handling mailing

Source:

Methods

(static) escapedHTMLString(s) → {string}

Source:

encode string to escape html code

Parameters:
Name Type Description
s string

inputed string

Returns:

newString new string escaped html code

Type
string

(static) getUserFirstName(member) → {string}

Source:

Gets members first name to use in the email

Parameters:
Name Type Description
member object

member document

Returns:

value to use as member's first name

Type
string

(static) lookup(callback)

Source:

Lookup host name to use in links

Parameters:
Name Type Description
callback function

callback for result

(static) sendAutomatedMessageError(member, link)

Source:

Send email notifying a member about unrecoverable automated message error

Parameters:
Name Type Description
member object

user object

link string

link to use in email

(static) sendLocalizedMessage(lang, to, subject, message, callback)

Source:

Send localized email with params

Parameters:
Name Type Description
lang string

locale to use in email (to get values from properties)

to string

where to send email

subject string

key from localization files to use as subject

message string

key from localization files to use as email message

callback function

function to call when its done

(static) sendMail(message, callback)

Source:

Send email with message object

Parameters:
Name Type Description
message object

message object

Properties
Name Type Description
to string

where to send email

from string

from whom was email sent

subject string

subject for email

html string

email message

callback function

function to call when its done

(static) sendMessage(to, subject, message, callback)

Source:

Send email with params

Parameters:
Name Type Description
to string

where to send email

subject string

subject for email

message string

email message

callback function

function to call when its done

(static) sendPasswordResetInfo(member, prid)

Source:

Email to send to members when requesting to reset password

Parameters:
Name Type Description
member object

member document

prid string

password reset id

(static) sendToNewMember(member, memberPassword)

Source:

Email to send to new members

Parameters:
Name Type Description
member object

member document

memberPassword string

OTP for member to authorize

Source:

Email to send to new members

Parameters:
Name Type Description
member object

member document

prid string

id for password reset link

(static) sendToUpdatedMember(member, memberPassword)

Source:

Email to send to members where global admin updated their password

Parameters:
Name Type Description
member object

member document

memberPassword string

OTP for member to authorize