【问题标题】:Best way to send mass email to my subscribers ( BCC or PEAR mail queue ? )向我的订阅者发送大量电子邮件的最佳方式(BCC 或 PEAR 邮件队列?)
【发布时间】:2011-02-25 10:32:55
【问题描述】:

我需要向我的 5000 名订阅者发送电子邮件。 最好的方法是什么?

1) 使用密件抄送?:

  $from_addr = 'myemail@example.com';
  $mailing_list = 'sub1@example.com', 'sub2@example.com', 'sub3@example.com0;
  $message_subject = 'this is a test';

 `$headers = array ("From" => $from_addr,
                    "Bcc" => $mailing_list,
                    "Subject" => $message_subject);

  $smtp = Mail::factory("smtp", array ('host' => "smtp.example.com",
                                       'auth' => true,
                                       'username' => "xxx",
                                       'password' => "xxx"));

  $mail = $smtp->send($email, $headers, $message_body);`

.

2) 使用 PEAR 邮件队列?

【问题讨论】:

    标签: php email list smtp mailing


    【解决方案1】:

    首先使用内置的mail 函数并不是最好的方法。我建议您选择 SwiftMailer,它支持 HTML,支持不同的 mime 类型和 SMTP 身份验证,不太可能将您的邮件标记为垃圾邮件。

    另外,你可以看看这个梨包:

    http://pear.php.net/package/Mail_Queue

    【讨论】:

    • 为什么密件抄送不好?所以你会冷漠地建议 SwiftMailer 或 Pear mail_queue 吗?谢谢^_^
    • @xRobot:SwiftMailer 非常好,您应该查看它的文档以获取更多信息和功能列表。
    【解决方案2】:

    我还没有使用 PEAR mail_queue,但是使用队列绝对是正确的选择! 不应使用密件抄送,因为您的邮件很容易被 gmail/hotmail 等大型电子邮件提供商标记为垃圾邮件。 在电子邮件标题中还有数千个地址似乎很疯狂。甚至可能有一个限制。此外,一些邮件服务器可能会因为标题过大而拒绝您的邮件。最重要的是,应该发送您的电子邮件的邮件服务器不会对此感到高兴。

    【讨论】:

      猜你喜欢
      • 2012-09-20
      • 2010-11-01
      • 1970-01-01
      • 2018-02-21
      • 2010-11-19
      • 2011-11-11
      • 1970-01-01
      • 2011-09-08
      • 2014-10-30
      相关资源
      最近更新 更多