Question : PHPMAILER: Sending mutiple Emails to different addresses with one instance/connection?

Hi there,
I am trying to modify the phpmailer-class, so that sending multiple emails with one class instance is possible.
Problem is that the addresses add up: let's say I've got 5 different recepients, the first gets only his, the second gets the first one's and his and so on.

Any way to clear the cache after sending to one reciever?

Thx in advance

Answer : PHPMAILER: Sending mutiple Emails to different addresses with one instance/connection?

There are public methods to reset the class.  I have referenced them below, direct from a new download of the PHP5/6 class.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
  /**
   * Clears all recipients assigned in the TO array.  Returns void.
   * @return void
   */
  public function ClearAddresses() {
    $this->to = array();
  }
 
  /**
   * Clears all recipients assigned in the CC array.  Returns void.
   * @return void
   */
  public function ClearCCs() {
    $this->cc = array();
  }
 
  /**
   * Clears all recipients assigned in the BCC array.  Returns void.
   * @return void
   */
  public function ClearBCCs() {
    $this->bcc = array();
  }
 
  /**
   * Clears all recipients assigned in the TO, CC and BCC
   * array.  Returns void.
   * @return void
   */
  public function ClearAllRecipients() {
    $this->to = array();
    $this->cc = array();
    $this->bcc = array();
  }
Open in New Window Select All
Random Solutions  
 
programming4us programming4us