Recommend this page to a friend! | Stumble It! | Bookmark in del.icio.us |
All requests | > | What is the best PHP class to extract recipients from CSV file? | > | Request new recommendation | > | Featured requests | > | No recommendations | ||
by ramon espinel - 1 year ago (2014-11-05) parse csv list and send mail
+1 | When I send message it is delivered several times, Not just once. This is my script: <?php require_once('class.PHPMailer.php'); include("class.smtp.php"); $mail = new PHPMailer(); $mail->isSMTP(); $mail->Host = "mail.gmail.com"; $mail->SMTPDebug = 1; $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Host = "smtp.gmail.com"; $mail->Port = 465; $mail->Username = "mymail@gmail.com"; // GMAIL username $mail->Password = "mypsswrd"; // GMAIL password $mail->SetFrom('mymail@gmail.com', 'Just Me'); $mail->AddReplyTo("mymail@gmail.com"); $mail->Subject = "Subject"; $mail->Body = " Mail Message"; // optional, comment out and test $row = 1; if (($handle = fopen("test.csv", "r")) !== FALSE) {
$address = $data[$c]; $mail->AddAddress($address); $mail->AddAttachment("new.txt"); if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message sent!"; } } } } ?> |
+2 | by Manuel Lemos 11100 - 1 year ago (2014-11-12) Comment This class is also a good solution if you want to import your address from a CSV file to MySQL database, so you can query the database later to extract the recipients of your mailing. The author has written a nice article about how to import data from CSV files. |
+2 | by Oliver Leuyim Angel 55 - 1 year ago (2014-11-05) Comment with this you will be able to get all the mails and verify them to send mails. see files and there are examples |
1. by Manuel Lemos - 1 year ago (2014-11-06) Reply
I am not sure if this class can read files in CSV format.
I think Ramon wants something that reads emails from CSV files and add them as recipients, rather than importing into a database, although the database storage can be useful to send future mailing campaigns and manage the mailing list online.
2. by ramon espinel - 11 months ago (2015-02-24) Reply
Hello. Don't know why it was today i receive your import class message. By this time i already solve the situation but i believe your importer was good to do it too. Thank you.
3. by Manuel Lemos - 11 months ago (2015-02-24) in reply to comment 2 by ramon espinel Reply
There was an issue with the system that was not sending notifications about updates on this recommendation.
Recommend package | |
|