Class Notifier

Description

Notifier class has purpose of sending various notification to users. Primary notification method is email

  • version: 1.0

Located in /application/models/notifier/Notifier.class.php (line 10)


	
			
Class Constant Summary
Variable Summary
static boolean $exchange_compatible
Method Summary
static boolean forgotPassword ( $user)
static boolean getExchangeCompatible (void 0)
static Swift getMailer (void 0)
static boolean newMessage ( $message, array $people)
static boolean newMessageComment ( $comment)
static boolean newUserAccount ( $user, string $raw_password)
static string prepareEmailAddress (string $email, [string $name = null])
static bool sendEmail (string $to, string $from, string $subject, [string $body = false], [string $type = 'text/plain'], [string $encoding = '8bit'])
boolean milestoneAssigned ( $milestone)
Variables
static boolean $exchange_compatible = null (line 26)

Cached value of echange compatible config option

  • access: public
Methods
static method forgotPassword (line 35)

Reset password and send forgot password email to the user

  • throws: NotifierConnectionError
static boolean forgotPassword ( $user)
static method getExchangeCompatible (line 202)

Returns true if exchange compatible config option is set to true

static boolean getExchangeCompatible (void 0)
  • void 0
static method getMailer (line 241)

This function will return SMTP connection. It will try to load options from config and if it fails it will use settings from php.ini

static Swift getMailer (void 0)
  • void 0
static method newMessage (line 79)

Send new message notification to the list of users ($people)

  • throws: NotifierConnectionError
static boolean newMessage ( $message, array $people)
static method newMessageComment (line 106)

Send new comment notification to message subscriber

  • throws: NotifierConnectionError
static boolean newMessageComment ( $comment)
  • MessageComment $comment
static method newUserAccount (line 59)

Send new account notification email to the user whose accout has been created (welcome message)

  • throws: NotifierConnectionError
static boolean newUserAccount ( $user, string $raw_password)
  • User $user
  • string $raw_password
static method prepareEmailAddress (line 188)

This function will prepare email address. It will return $name <$email> if both params are presend and we are not in exchange compatibility mode. In other case it will just return email

static string prepareEmailAddress (string $email, [string $name = null])
  • string $email
  • string $name
static method sendEmail (line 220)

Send an email using Swift (send commands)

  • return: successful
static bool sendEmail (string $to, string $from, string $subject, [string $body = false], [string $type = 'text/plain'], [string $encoding = '8bit'])
  • string $to: to_address
  • string $from: from_address
  • string $subject: subject
  • string $body: body, optional
  • string $type: content-type,optional
  • string $encoding: content-transfer-encoding,optional
milestoneAssigned (line 157)

Milestone has been assigned to the user

  • throws: NotifierConnectionError
boolean milestoneAssigned ( $milestone)
Class Constants
MAIL_TRANSPORT_MAIL = 'mail()' (line 13)

Supported transports *

MAIL_TRANSPORT_SMTP = 'smtp' (line 14)
SMTP_SECURE_CONNECTION_NO = 'no' (line 17)

Secure connection values *

SMTP_SECURE_CONNECTION_SSL = 'ssl' (line 18)
SMTP_SECURE_CONNECTION_TLS = 'tls' (line 19)

Documentation generated on Wed, 23 Jan 2008 01:58:57 +0000 by phpDocumentor 1.4.0