本文整理汇总了PHP中QQN::EmailQueue方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::EmailQueue方法的具体用法?PHP QQN::EmailQueue怎么用?PHP QQN::EmailQueue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQN
的用法示例。
在下文中一共展示了QQN::EmailQueue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
QEmailServer::$SmtpServer = SMTP_SERVER;
QEmailServer::$OriginatingServerIp = SMTP_EHLO;
QEmailServer::$TestMode = SMTP_TEST_MODE;
$objEmailQueue = EmailQueue::QueryArray(QQ::IsNull(QQN::EmailQueue()->ErrorFlag), QQ::Clause(QQ::OrderBy(QQN::EmailQueue()->HighPriorityFlag, false), QQ::LimitInfo(50)));
foreach ($objEmailQueue as $objEmail) {
$objEmail->Send();
}
示例2: ResolveContentItem
/**
* Used internally by the Meta-based Add Column tools.
*
* Given a QQNode or a Text String, this will return a EmailQueue-based QQNode.
* It will also verify that it is a proper EmailQueue-based QQNode, and will throw an exception otherwise.
*
* @param mixed $mixContent
* @return QQNode
*/
protected function ResolveContentItem($mixContent)
{
if ($mixContent instanceof QQNode) {
if (!$mixContent->_ParentNode) {
throw new QCallerException('Content QQNode cannot be a Top Level Node');
}
if ($mixContent->_RootTableName == 'email_queue') {
if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
$objCurrentNode = $mixContent;
while ($objCurrentNode = $objCurrentNode->_ParentNode) {
if (!$objCurrentNode instanceof QQNode) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
}
return $mixContent;
} else {
throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "email_queue".');
}
} else {
if (is_string($mixContent)) {
switch ($mixContent) {
case 'Id':
return QQN::EmailQueue()->Id;
case 'ToAddress':
return QQN::EmailQueue()->ToAddress;
case 'FromAddress':
return QQN::EmailQueue()->FromAddress;
case 'Subject':
return QQN::EmailQueue()->Subject;
case 'Body':
return QQN::EmailQueue()->Body;
case 'Html':
return QQN::EmailQueue()->Html;
case 'HighPriorityFlag':
return QQN::EmailQueue()->HighPriorityFlag;
case 'ErrorFlag':
return QQN::EmailQueue()->ErrorFlag;
case 'ErrorMessage':
return QQN::EmailQueue()->ErrorMessage;
default:
throw new QCallerException('Simple Property not found in EmailQueueDataGrid content: ' . $mixContent);
}
} else {
if ($mixContent instanceof QQAssociationNode) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
} else {
throw new QCallerException('Invalid Content type');
}
}
}
}
示例3: CountByErrorFlag
/**
* Count EmailQueues
* by ErrorFlag Index(es)
* @param boolean $blnErrorFlag
* @return int
*/
public static function CountByErrorFlag($blnErrorFlag)
{
// Call EmailQueue::QueryCount to perform the CountByErrorFlag query
return EmailQueue::QueryCount(QQ::Equal(QQN::EmailQueue()->ErrorFlag, $blnErrorFlag));
}
示例4:
<?php
QEmailServer::$SmtpServer = SMTP_SERVER;
QEmailServer::$SmtpPort = SMTP_PORT;
QEmailServer::$SmtpUsername = SMTP_USERNAME;
QEmailServer::$SmtpPassword = SMTP_PASSWORD;
QEmailServer::$AuthLogin = true;
$objEmailQueue = EmailQueue::QueryArray(QQ::IsNull(QQN::EmailQueue()->ErrorFlag), QQ::Clause(QQ::LimitInfo(50)));
foreach ($objEmailQueue as $objEmail) {
$objEmail->Send();
}
示例5: LoadByEmailQueueId
/**
* Load a single EmailQueue object,
* by EmailQueueId Index(es)
* @param integer $intEmailQueueId
* @return EmailQueue
*/
public static function LoadByEmailQueueId($intEmailQueueId, $objOptionalClauses = null)
{
return EmailQueue::QuerySingle(QQ::Equal(QQN::EmailQueue()->EmailQueueId, $intEmailQueueId), $objOptionalClauses);
}