aargh.
waarom werkt dit niet:
dit stuurt wel netjes mailtjes maar als $this->cc_address bv dit bevat:"arie@domain.com,piet@domain2.com" dan word er aleen een cc'tje naar arie@domain.com gestuurd....
en als het dit is:"piet@domain2.com,arie@domain.com,piet" dan word er aleen een cc'tje naar piet@domain2.com gestuurd....
als je het mailtje dan bekijkt dat je ontvangt staat er toch netjes in de cc: "Cc: arie@domain.com, piet@domain2.com" terwijl piet nix krijgt
wat doe ik fout?
waarom werkt dit niet:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| function send(){
$headers = "";
if($this->from_address != ""){
$headers .= "From: " . $this->from_address . "\r\n";
}
if($this->cc_address != ""){
$cc = str_replace(" ","",$this->cc_address);
$cc = str_replace(",",", ",$cc);
$headers .= "Cc: " . $cc . "\r\n";
}
mail($this->to_address, $this->subject, $this->message, $headers);
} |
dit stuurt wel netjes mailtjes maar als $this->cc_address bv dit bevat:"arie@domain.com,piet@domain2.com" dan word er aleen een cc'tje naar arie@domain.com gestuurd....
en als het dit is:"piet@domain2.com,arie@domain.com,piet" dan word er aleen een cc'tje naar piet@domain2.com gestuurd....
als je het mailtje dan bekijkt dat je ontvangt staat er toch netjes in de cc: "Cc: arie@domain.com, piet@domain2.com" terwijl piet nix krijgt
wat doe ik fout?
"I disagree with what you are saying, but I will defend to the death your right to say it." -- not clear who