我需要通过新设计的自动电子邮件平台发送大量电子邮件的帮助。
我的部分内容:
$options = [
'user_id' => $this->me->id,
'limit' => 200000,
'type' => $exploded[1]
];
$this->data['contacts'] = $this->crm_model->get_portal_contacts($options);
$emails = array();
foreach ($this->data['contacts'] as $contact) {
$this->data['fullname'] = get_user($contact)->full_name(false);
$emaildata = [
'from' => ['name' => 'Domain', 'email' => '<no-reply@domai.org>\r\n'],
'to' => strip_tags(get_user($contact)->email),
'subject' => $this->data['email']['email_subject'],
'message' => $this->load->view('np_sh/email/email-template', $this->data, TRUE)
];
$status = _send_mail($emaildata);
}
_send_mail()
函数正在将$emaildata
变量与默认参数合并,并准备使用PHPMailer发送电子邮件并返回boolean
状态。