php - 如何不延迟地发送邮件
问题描述
我必须用不同的信息向 5 个人发送邮件。我正在使用 SMTP 发送邮件,使用下面的代码发送邮件,但由于延迟响应,它有一些延迟。我怎样才能毫不拖延地发送邮件?
这是我正在使用的代码
$email = '';
$from = '';
$subject = '';
$message = 'Message';
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '',
'smtp_pass' => '',
'mailtype' => 'html',
'charset' => 'utf-8'
);
$this->load->library('email');
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$this->email->from($from, '');
$this->email->to($email);
$this->email->subject($subject);
$this->email->message($message);
$result = $this->email->send();
解决方案
推荐阅读
- python - 在运行 jupyter 的 Google Cloud VM 中导入必要的库时遇到问题
- html - 如何使另一张幻灯片图像出现?
- flutter - 在 setState() 中调用 Provider 自定义方法导致错误:或在构建期间调用 markNeedsBuild()
- python - 如何将一个函数的结果存储到一个类中?
- list - Prolog - 识别变量的子列表
- javascript - URLSearchParams.get() 返回部分值
- c# - Xamarin ProgressBar 绑定进度
- ruby-on-rails - 仅当此类型尚不存在时才渲染 h3
- vue.js - VeeValidate - 检查已验证的输入字段以启用另一个输入
- javascript - 将变量发送到同一个函数