phpmailer

How to build an email queue with PHPmailer?

狂风中的少年 提交于 2020-01-15 11:54:54
问题 I have built an emailing script with PHPmailer after inserting into a table, however, I'm getting a bad gateway 502 coz the script times out. and sending 300+ emails in response to a web request doesn't sound like a good idea to me. So my question is how can I build a queue that will send the emails in the background? as far as I understand I will need new table lets say email_queue_table insert the email addresses, content and then have a field called status sent or queued create a while

PHP Mail adding BCC

吃可爱长大的小学妹 提交于 2020-01-15 04:32:26
问题 I have a form that populates a PHP mail to be sent to our clients, I want to BCC most of the clients due to privacy. I have the following code $to = "******@e-track.co.za"; //To recipients $email_from = '*****@etrackbureau.co.za';//<== update the email address $email_subject = "New Overdue Loaded"; $email_body = "A new High Risk Client has been loaded by $name $company.\n". "\n Client Name: $driver_name $driver_surname\n \n Client ID or Passport Number: $driver_id\n \n Nationality: $driver

PHPMailer : replace the default messageID

时光怂恿深爱的人放手 提交于 2020-01-15 03:44:10
问题 I send emails using PHPMailer, evthg works well but I would to set a uniq MessageID for each email. PHPMailer version : "v5.2.16" (loaded with Composer from https://github.com/PHPMailer/PHPMailer.git) I found the documentation here : http://phpmailer.github.io/PHPMailer/classes/PHPMailer.html#property_MessageID so here is what I tried : $mail = new PHPMailer; ... $mail->MessageID = md5('HELLO'.(idate("U")-1000000000).uniqid()).'-'.$type.'-'.$id.'@domain.com'; Result : This is always the

PHPMailer not working on 000webhost

余生颓废 提交于 2020-01-13 19:14:27
问题 This code seems to work in Xampp on my mac localhost but it doesn't seem to work on my free 000webhost account. I already tried getting rid of SSL but it didn't help. Keep in mind that this program get variables from an external form. <?php $subject = htmlentities($_POST['subject']); $email = $_POST['email']; $message = htmlentities($_POST['message']); require_once 'PHPMailer/PHPMailerAutoload.php'; $m = new PHPMailer; $m->isSMTP(); $m->SMTPAuth = true; //$m->SMTPDebug = 1; $m->Host = 'smtp

PHP - file_get_contents() with variable in string?

泪湿孤枕 提交于 2020-01-13 11:05:25
问题 Im trying to email an order with PHPMailer to the customer when this order is received. I tried doing that this way: $email_page = file_get_contents("email_order_html.php?order=$order_id"); I want to get the contents of this page as string so I can send this with PHPMailer but this function wont execute the page because of the variable $order_id in it, how can I fix this? 回答1: You can only add Query Params when using file_get_contents with an Url Aware Stream Wrapper, e.g. it would work for

Problems with PHP Mailer header encoding

帅比萌擦擦* 提交于 2020-01-13 09:22:05
问题 <?php require_once('../class.phpmailer.php'); //include("../class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded iconv_set_encoding("internal_encoding", "UTF-8"); $mail = new PHPMailer(); $mail->CharSet = "utf8"; /* $body = file_get_contents('contents.html'); $body = eregi_replace("[\]",'',$body); */ $mail->IsSMTP(); // telling the class to use SMTP //$mail->Host = "mail.app-cpr.com"; // SMTP server //$mail->SMTPDebug = 2; // enables SMTP debug

Problems with PHP Mailer header encoding

╄→尐↘猪︶ㄣ 提交于 2020-01-13 09:21:27
问题 <?php require_once('../class.phpmailer.php'); //include("../class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded iconv_set_encoding("internal_encoding", "UTF-8"); $mail = new PHPMailer(); $mail->CharSet = "utf8"; /* $body = file_get_contents('contents.html'); $body = eregi_replace("[\]",'',$body); */ $mail->IsSMTP(); // telling the class to use SMTP //$mail->Host = "mail.app-cpr.com"; // SMTP server //$mail->SMTPDebug = 2; // enables SMTP debug

PHP通过phpmailer批量发送邮件功能

こ雲淡風輕ζ 提交于 2020-01-13 02:23:35
前端页面代码: 注意:目前发送人使用的qq邮箱支持的不是特别友好.建议使用网易 新浪 163等其他邮箱. 需要用到phpmailer包 下载地址:https://sourceforge.net/projects/phpmailer/ http://download.csdn.net/detail/u014236259/9663181 发送到多个邮箱用“,”隔开。例: 889955@qq.com,6666666@qq.com,5454545@qq.com <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <link rel="stylesheet" type="text/css" href="http://www.sucaihuo.com/jquery/css/common.css" /> <style type="text

Cant send email with correct characters with PHPMailer

回眸只為那壹抹淺笑 提交于 2020-01-11 19:34:15
问题 I'm trying to send a e-mail with the PHPmailer class, but the html i send, is empty, or the characters are unconfigured, and without accents. <?php header("Content-Type: text/html; charset=ISO-8859-1", true); require_once('class.phpmailer.php'); include "config.php"; $nome = trim($_POST['nome']); $email = trim($_POST['Imail']); $usuario = trim($_POST['usuario']); $senha = trim($_POST['senha']); $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we

Cant send email with correct characters with PHPMailer

陌路散爱 提交于 2020-01-11 19:30:10
问题 I'm trying to send a e-mail with the PHPmailer class, but the html i send, is empty, or the characters are unconfigured, and without accents. <?php header("Content-Type: text/html; charset=ISO-8859-1", true); require_once('class.phpmailer.php'); include "config.php"; $nome = trim($_POST['nome']); $email = trim($_POST['Imail']); $usuario = trim($_POST['usuario']); $senha = trim($_POST['senha']); $mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we