phpmailer

how to send emails to multiple addresses using phpmailer

眉间皱痕 提交于 2019-12-08 07:52:34
问题 I am trying to send emails to multiple email addresses using php mailer but its not working. I've tried explode the addresses but nothing seems to work. here is my code html: <input type="text" name="addresses" value="{$addresses}"/> current output in the input is test1@gmail.com,test2@gmail.com,test3@gmail.com, php to send email: /* Get Customer info*/ $sql = mysql_query("SELECT * FROM customer WHERE ID='$id' LIMIT 1"); $sql=mysql_fetch_array($sql); $fname=$sql['FIRST_NAME']; $lname=$sql[

PHPMailer , keep 1 SMTP Connection with different receiver by email content

蓝咒 提交于 2019-12-08 07:08:29
$phpMailer = New PHPMailer(); $phpMailer->isSMTP(); $phpMailer->SMTPKeepAlive = true; for ( ... ) { // Send your emails right away [ ... ] } $phpMailer->SmtpClose(); HI, I have an example code for KeepAlive SMTP here, but my problem is I send email with difference contents to my users. So each user have 1 content. Can I do it like this: for ( ... ) { $phpMailer->addAddress($user['email'], $user['name']); $phpMailer->Subject = $user['subject']; $phpMailer->Body = $user['body']; $phpMailer->Send() } Will the ->addAddress increase my recipients every time on the loop? Or will it clean the old

send an email with mysql fetch records

守給你的承諾、 提交于 2019-12-08 06:35:46
问题 now i want to generate a customer voucher and then send it to particular person email id. i have done the basic mail function using phpmailer. now, i received an email but i did not get the mysql datas. i tried something. but its not working. for example if i am clicking the voucher id 7 then it will show the full details of voucher id 7. i want to send that particular (voucher id 7) datas to an email. $body = file_get_contents('print.php'); here how can i insert mysql_fetch records into

iCalendar invite is not showing RSVP buttons in email clients

痞子三分冷 提交于 2019-12-08 05:23:15
问题 I'm using PHPMailer to send email. My ics content is: BEGIN:VCALENDAR METHOD:REQUEST VERSION:2.0 PRODID:-//FooBar//FooBar Calendar//EN BEGIN:VEVENT UID:8f5a0777-bf6d-17d2-f14a-52e7feedf810 ORGANIZER;CN=Foo:foo@bar.com DTSTART:20140130T191500Z DTEND:20140130T194500Z DTSTAMP:20140129T144300Z SUMMARY:Foo Bar 11 DESCRIPTION: END:VEVENT END:VCALENDAR For some reason I don't see the expected RSVP buttons in any email clients. Both Gmail and Mac Mail simply include the ics as a file attachment, I

PHPMailer do not work properly sometimes on gmail port 465 or 587 on localhost

邮差的信 提交于 2019-12-08 05:14:09
问题 I am using the latest version of PHPMailer 6.0.2 on LOCALHOST with Gmail SMTP Ports [ SSL on 465 and TLS 587 ]. It works well but not stable or works properly, very strange while OpenSSL Extension is also active in PHP Config /PHP.ini file. It returns the error " SMTP Error: Could not connect to SMTP host ", sometimes on 465 or 587 port. As right now it's on 587. Here the exact error on port 587 ; 2017-12-05 13:00:26 Connection: opening to smtp.gmail.com:587, timeout=300, options=array ( 'ssl

phpmailer timeout not working

[亡魂溺海] 提交于 2019-12-08 04:57:33
问题 i use phpmailer to send mail,and i want to get the result,because send mail is very frequently. so i want to use phpmailer "timeout" .but is not working. my code $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Timeout = 10; $mail->SMTPAuth = true; $mail->SMTPKeepAlive = true; $mail->SMTPSecure = "ssl"; $mail->Host = "smtp.gmail.com"; $mail->Port = 465; $mail->Username = "qinqin1920@gmail.com"; $mail->Password = "xxxx"; $mail->From = "qinqin1920@gmail.com"; $mail->Subject = "This is the

PHPMailer return to AJAX

末鹿安然 提交于 2019-12-08 04:55:43
问题 Currently I' am setting up a email verification system for my personal site. I (try) to handle this with jQuery and AJAX (code follows). But the problem is that it does not return to the echo 2; in my signup.inc.php so that I can continue working in the AJAX call. As I understand it the compiler should return to/continue from the point where it was redirected, in this case the send_ver_email($user_email) below and echo 2. What did I get wrong? This is pretty new to me and I don't have so much

PHP, PHPMailer: Can't get example code for PHPMailer to work

风格不统一 提交于 2019-12-08 03:39:48
问题 I'm trying to get php mailer to work. I'm getting an error but couldn't find any info from google on it. $mail = new phpmailer; $mail->IsSMTP(); // set mailer to use SMTP $mail->SMTPSecure = "ssl"; $mail->Host = "smtp.gmail.com"; $mail->Port = 465; $mail->From = "from@email.com"; $mail->FromName = "Mailer"; $mail->AddAddress("user@theirsite.com", "User"); //$mail->AddAddress("ellen@site.com"); // name is optional $mail->AddReplyTo("info@site.com", "Information"); $mail->WordWrap = 50; // set

Receiving Spam from my Form Using PHPMailer

一世执手 提交于 2019-12-08 03:11:52
问题 I am coming to stackoverflow for this because everything I search pretty much talks about email from a form using PHPMailer going to a users spam box. But, I need info on receiving spam from the form itself. I use it on a small, very light traffic real estate agents website. She gets spam from time to time and I don't know how to resolve it. PHPMailer seems to be the go to tool for sending email with PHP, so I figure spam/security is pretty well covered. I must be doing something wrong.... I

How to use variables in phpmailer message body

雨燕双飞 提交于 2019-12-08 03:06:32
问题 I'm editing a form and I want to receive as mail when users fill it and send it. I received variables on mail before, such like: Name: $name. Now contact.php returns a blank page and I can't receive the form as mail. I tried before that, $body_message = 'Name: ' . $name . "\r\n"; $body_message .= 'E-mail: ' . $mail_from . "\r\n"; $body_message .= 'Message: ' . $message; But it doesn't work. And that also, $mail->Body = '<b>You have a reservation!</b> Name: $name Surname: $surname Phone: