本文整理汇总了PHP中message::sendMail方法的典型用法代码示例。如果您正苦于以下问题:PHP message::sendMail方法的具体用法?PHP message::sendMail怎么用?PHP message::sendMail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类message
的用法示例。
在下文中一共展示了message::sendMail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
$patterns[8] = "u00c9";
$replacements[8] = "É";
$patterns[9] = "u00cd";
$replacements[9] = "Í";
$patterns[10] = "u00d3";
$replacements[10] = "Ó";
$patterns[11] = "u00da";
$replacements[11] = "Ú";
$patterns[12] = "u00d1";
$replacements[12] = "Ñ";
// user name
$patterns[13] = "{nombre}";
// sending congrats email to each person
echo "cantidad de recipients: " . count($recipient['email']) . "\n\n\n";
for ($i = 0; $i < count($recipient['email']); $i++) {
echo "email: " . $recipient['email'][$i] . "\n\n";
$replacements[13] = $recipient['name'][$i];
$body = str_replace($patterns, $replacements, $body);
$command = substr($_SERVER["PHP_SELF"], 0, -11) . 'sendmail\\sendEmail.exe ' . '-f ' . $this->config->mailfrom . ' ' . '-t ' . $recipient['email'][$i] . ' ' . '-u "' . $subject . '" ' . '-m "' . $body . '" ' . '-s ' . $this->config->smtphost . ':25 ' . '-xu intranet_fe ' . '-xp ' . $this->config->smtppass . ' ' . '-o tls=yes ' . '-o message-content-type=html ' . '-o message-charset=utf-8 ' . '-a ' . substr($_SERVER["PHP_SELF"], 0, -40) . $img;
exec($command);
sleep(1);
$body = str_replace($recipient['name'][$i], $patterns[13], $body);
echo $command;
}
}
}
}
$message = new message();
$recipients = $message->getBirthdays();
$message->sendMail($recipients);