01. december 2004 - 12:30Der er
12 kommentarer og 1 løsning
Postkort modul skal sende mails som bcc
Hej Eksperter
Jeg har et postkort modul, hvor jeg skal udsende mine postkort til flere modtagere af gangen. Jeg vil derfor gerne have det til at sende kortene som bcc.
Jeg mener, det er i denne her stump kode, der skal ændres. Har jeg ret?
## Create a mail message and send it to the recipient mail($recipient, "$name " . $lang['pcm_sender_sent'] . "!", "", "From: \"$name\" <$email> Reply-To: \"$name\" <$email> X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=\"------------020901080506000807040501\" Status: ...
Hej Haren: Øhh. JEg tror ikke jeg har formuleret mig helt klart så. Jeg vil ikke have tilsendt en bcc kopi af alle julekortnene, der sendes. Jeg vil sende julekortene til mange af gangen og skjule de andre modtagere for hinanden. Men din løsning tilføjer bare en bcc modtager (har jeg ikke ret i det)
################################################################# ## ## Takes an array and moves the value of the key specified by $item_val ## either up or down through the array depending on the value of $item_act
function pops_array_shift_key($pri_array,$item_val,$item_act) {
$item_key = array_search($item_val,$pri_array);
if ($item_act == "u" && ($item_key+1 <= count($pri_array))) {
## ## ################################################################# ## ## Convert a numeric decimal string into a two sig fig decimal string ## e.g. 120.0 -> 120.00
## ## ################################################################# ## ## Take a sentence or group of words and trim to a certain word length with closing ellipis (...) ## ## $string (string) The string to truncate ## $length (int) The number of words to include
function pops_trim_words($string,$length) {
$words = explode(" ",$string);
if (count($words) >= $length) {
$trimmed = "";
for ($i = 0; $i < $length; $i++) {
$trimmed .= $words[$i]." ";
}
$trimmed = rtrim($trimmed," \t\n\r.,()!;:?'-");
$trimmed .= "...";
return($trimmed);
} else {
return($string);
} }
## ## ################################################################# ## ## mixed pops_trim_ellipsis([[string string], [int length]]) ## ## Returns the input variable string trimmed to length and with a trailing ellipsis ## if the string length is greater than the input length value ##
if (!@mail($to, $subject, $message, $headers, "-f $fromemail")) {
return(FALSE);
} else {
return(TRUE);
}
}
}
## ## ################################################################# ## ## Input two variables (Windows or MacOS) and return one depending on user platform.
function pops_platform_swap($winvalue,$macvalue) {
################################################################# ## ## Takes an array and moves the value of the key specified by $item_val ## either up or down through the array depending on the value of $item_act
function pops_array_shift_key($pri_array,$item_val,$item_act) {
$item_key = array_search($item_val,$pri_array);
if ($item_act == "u" && ($item_key+1 <= count($pri_array))) {
## ## ################################################################# ## ## Convert a numeric decimal string into a two sig fig decimal string ## e.g. 120.0 -> 120.00
## ## ################################################################# ## ## Take a sentence or group of words and trim to a certain word length with closing ellipis (...) ## ## $string (string) The string to truncate ## $length (int) The number of words to include
function pops_trim_words($string,$length) {
$words = explode(" ",$string);
if (count($words) >= $length) {
$trimmed = "";
for ($i = 0; $i < $length; $i++) {
$trimmed .= $words[$i]." ";
}
$trimmed = rtrim($trimmed," \t\n\r.,()!;:?'-");
$trimmed .= "...";
return($trimmed);
} else {
return($string);
} }
## ## ################################################################# ## ## mixed pops_trim_ellipsis([[string string], [int length]]) ## ## Returns the input variable string trimmed to length and with a trailing ellipsis ## if the string length is greater than the input length value ##
if (!@mail("no_replay@domæne.dk", $subject, $message, $headers, "-f $fromemail")) {
return(FALSE);
} else {
return(TRUE);
}
}
}
## ## ################################################################# ## ## Input two variables (Windows or MacOS) and return one depending on user platform.
function pops_platform_swap($winvalue,$macvalue) {
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.