|
static | add (StudipMail $mail, $message_id=null, $user_id=null) |
|
static | sendNew () |
|
static | sendAll ($limit=null) |
|
static | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
static | exists ($id) |
|
static | countBySql ($sql='1', $params=[]) |
|
static | create ($data) |
|
static | build ($data, $is_new=true) |
|
static | buildExisting ($data) |
|
static | import ($data) |
|
static | findBySQL ($sql, $params=[]) |
|
static | findOneBySQL ($where, $params=[]) |
|
static | findThru ($foreign_key_value, $options) |
|
static | findEachBySQL ($callable, $sql, $params=[]) |
|
static | findMany ($pks=[], $order='', $order_params=[]) |
|
static | findEachMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | findAndMapBySQL ($callable, $where, $params=[]) |
|
static | findAndMapMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | deleteBySQL ($where, $params=[]) |
|
static | toObject ($id_or_object) |
|
static | __callStatic (string $name, array $arguments) |
|
|
const | ID_SEPARATOR = '_' |
|
static | $schemes = null |
|
| _getId ($field) |
|
| _setId ($field, $value) |
|
| _getAdditionalValueFromRelation ($field) |
|
| _setAdditionalValueFromRelation ($field, $value) |
|
| _getAdditionalValue ($field) |
|
| _setAdditionalValue ($field, $value) |
|
| parseRelationOptions ($type, $name, $options) |
|
| storeRelations ($only_these=null) |
|
| deleteRelations () |
|
| initializeContent () |
|
| applyCallbacks ($type) |
|
| cbNotificationMapper ($cb_type) |
|
| cbAfterInitialize ($cb_type) |
|
| setSerializedValue ($field, $value) |
|
| setI18nValue ($field, $value) |
|
| $content = [] |
|
| $content_db = [] |
|
| $is_new = true |
|
| $is_deleted = false |
|
| $relations = [] |
|
| $additional_data = [] |
|
static | $config = [] |
|
static | $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id'] |
|
static | $performs_batch_operation = false |
|
◆ add()
static add |
( |
StudipMail |
$mail, |
|
|
|
$message_id = null , |
|
|
|
$user_id = null |
|
) |
| |
|
static |
Add an email to the queue.
- Parameters
-
StudipMail | $mail | : the mailobject that should be added and sent later. |
string | null | $message_id | : the id of the Stud.IP internal message the mail is related to. Leave this null if it isn't related to any internal message. |
string | null | $user_id | : user_id of the receiver. Leave null if the receiver has no account in Stud.IP. |
- Returns
- MailQueueEntry : object in the mailqueue.
◆ configure()
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
◆ send()
Sends the object in the mailqueue. If this succeeds, the object will be deleted immediately. Otherwise the field "tries" in the mailqueue table will be incremented by one.
- Returns
- bool True, if the mail in the mailqueue entry could be sent, false otherwise.
◆ sendAll()
static sendAll |
( |
|
$limit = null | ) |
|
|
static |
Sends all mails in the mailqueue. Stud.IP will give each mail 24 tries to deliver it. If the mail could not be sent after 24 tries (which are 24 hours) it will stay in the mailqueue table but won't be sent anymore. Each mail will only be tried to deliver once per hour. So if it fails Stud.IP will try again next hour.
- Parameters
-
int | $limit | The maximum amount of messages to be sent. |
- Returns
- array An empty array if no status messages are output or an array with status messages, one for each mail.
◆ sendNew()
Sends all new mails in the mailqueue (which means they haven't been sent yet).
The documentation for this class was generated from the following file: