Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpMailer - How do you Remove Recipients

People also ask

Why it is advantages to use PHPMailer for sending and receiving email?

It can print various kinds of error messages in more than 40 languages when it fails to send an email. It has integrated SMTP protocol support and authentication over SSL and TLS. It can send an alternative plain-text version of email for non-HTML email clients.

How many emails can I send with PHPMailer?

Its called SMTP Relays and it is defined on a per (sending) email basis but usually defaults to 250.

Why does PHPMailer go to spam?

usually this happens because the sending server is already marked as spam by somebody. The way i found is go to the gmail account mark the item as 'important' in gmail and 'Add to Safe senders' in Outlook.


You can use clearAllRecipients( )

$mailer->clearAllRecipients( ); // clear all


im using this always before sending email to recipients:

// clear addresses of all types
$mail->ClearAddresses();  // each AddAddress add to list
$mail->ClearCCs();
$mail->ClearBCCs();

then im doing just this: (not using CC or BCC, $toaddress is just an array of recipients)

foreach($toaddress as $key=>$val) { $mail->AddAddress( $val ); }

im using PHPMailer 5.2