\Mailbot

Mailbot base class

Summary

Methods
Properties
Constants
__construct()
No public properties found
No constants found
queryDB()
getSingleRow()
log()
sendEmail()
reportStats()
$count
N/A
No private methods found
No private properties found
N/A

Properties

$count

$count

Methods

__construct()

__construct() : \nothing

constructor.

..

Returns

\nothing

queryDB()

queryDB(string $queryString) : object

an interface for all DB calls from mailbot

Parameters

string $queryString

the SQL query to execute

Returns

object —

the result from the DB call

getSingleRow()

getSingleRow(string $queryString) : object

a local replacement for LoadRow

Parameters

string $queryString

the SQL query to execute

Returns

object —

the first row returned by the query

log()

log(string $msg) : \nothing

log all mailbot(s) activities

Parameters

string $msg

the text to log

Returns

\nothing

sendEmail()

sendEmail(string $subject, string $from, string $to, string $title, string $body, string $language) : object

actually send out emails using a common BW template

Parameters

string $subject

the subject line for the message

string $from

the email address of the sender

string $to

the email address of the recipient

string $title

an optional title to show in the message (HTML H1 tag) (default: false)

string $body

the plaintext body of the message

string $language

the language code used in the message (default: 'en')

Returns

object —

the result from the MOD_mail::sendEmail call

reportStats()

reportStats() : \nothing

Log results for the bot execution

Returns

\nothing