I want to send mail to hundreds of email addresses in PHP using php mail function. How can I do that?
php'; $output = ''; foreach($_POST['email_data'] as $row) { $mail = new PHPMailer; $mail->IsSMTP(); //Sets Mailer to send message using SMTP $mail->Host = 'smtpout.secureserver.net'; //Sets the SMTP hosts of your Email hosting, this for Godaddy $mail->Port = '80'; //Sets the default SMTP server port $mail->SMTPAuth = ...
Using multiple email address for posting mails from PHPMailer class. We may have a list of email address to which the common message should go. For this we will store all email address in an array and then we will loop through the array to add all emails to our outgoing address.
PHP makes use of mail() function to send an email. This function requires three mandatory arguments that specify the recipient's email address, the subject of the the message and the actual message additionally there are other two optional parameters. mail( to, subject, message, headers, parameters );
You can also use SwiftMailer
Please also look at a similar post here
You can try phplist
It will be a better option
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With