dounaidu0204 2015-09-13 10:09
浏览 29

如何使用PHP发送100000邮件

i have used below code

<?php
$file = fopen("contacts.csv","r");
while(! feof($file))
{
$age=fgetcsv($file);
foreach($age as $x_value) 
{
$to = $x_value;
$subject = "HTML email";
$message = "<html><head><title>HTML email</title></head><body>here ismessage</body></html>";
$headers = "MIME-Version: 1.0" . "
";
$headers .= "Content-type:text/html;charset=UTF-8" . "
";
$headers .= 'From: <abc@company.com>' . "
";
mail($to,$subject,$message,$headers);
}
}
fclose($file);
?>

i try this but this will not work because this is not secure so what method i use

  • 写回答

1条回答 默认 最新

  • douyan1944 2015-09-14 00:11
    关注

    You can use an Email Sending Service such as Amazon Simple Email Service. https://aws.amazon.com/ses/

    They will charge you for the service, but the costs are very affordable: $0.1 per thousand emails

    The integration with cakephp is pretty easy, but you will need to use the CakeEmail Library and use SMTP Transport.

    http://book.cakephp.org/2.0/en/core-utility-libraries/email.html

    评论

报告相同问题?

悬赏问题

  • ¥15 制裁名单20240508芯片厂商
  • ¥20 易康econgnition精度验证
  • ¥15 线程问题判断多次进入
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接