Connecting Tech Pros Worldwide Help | Site Map

mail to bcc help please

fo
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi I want to add one other emailrecepient to my mail code and can't seem to
get it wright. Could you please help. Here is the code
is this lien correct <emerge@goldcoastrentals.com.au>\nX-Mailer: PHP/" .
phpversion());

Many thanks
FO
--------------
blah blah
...
$user_id = mysql_insert_id();
// Let's mail the user!
$subject = "Your Membership at NSSA!";
$message = "Dear $first_name $last_name,

Thank you for registering at our website, http://www.nssa.org.au !

You are two steps away from logging in and accessing our exclusive members
area.

To activate your membership, please click here:
http://www.nssa.org.au/auth/activate.php?id=$user_id&code=$db_password

Once you activate your membership, you will be able to login with the
following information:
Username: $username
Password: $random_password

Thanks!
The Webmaster

This is an automated response, please do not reply!";
mail($user_email, $subject, $message, "From: NSSA Customer
Service<emerge@goldcoastrentals.com.au>\nX-Mailer: PHP/" . phpversion());
echo "<center><font face=\"Arial\" size=\"2\" >New member's membership and
activation information<br />has been e-mailed to their email address!
<br /><br />
Activation of membership will be processed by the new member. </font>";
}
?>


Pedro Graca
Guest
 
Posts: n/a
#2: Jul 17 '05

re: mail to bcc help please


fo wrote:[color=blue]
> Hi I want to add one other emailrecepient to my mail code and can't seem to[/color]
....[color=blue]
> <emerge@goldcoastrentals.com.au>\nX-Mailer: PHP/" . phpversion());[/color]

Headers should be separated by "\r\n";


<?php
$headers = array();
$headers[] = 'From: "NSSA Customer Service" <emerge@goldcoastrentals.com.au>';
$headers[] = 'X-Mailer: PHP/' . phpversion();
$headers[] = 'Bcc: <webmaster@goldcoastrentals.com.au>';

// ...

if (!mail($to, $sub, $body, implode("\r\n", $headers))) echo 'Error sending mail.';
?>


--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Anders K. Madsen
Guest
 
Posts: n/a
#3: Jul 17 '05

re: mail to bcc help please


On 21 Jul 2004 09:41:45 GMT
Pedro Graca <hexkid@hotpop.com> wrote:
[color=blue]
> fo wrote:[color=green]
> > Hi I want to add one other emailrecepient to my mail code and can't
> > seem to[/color]
> ...[color=green]
> > <emerge@goldcoastrentals.com.au>\nX-Mailer: PHP/" . phpversion());[/color]
>
> Headers should be separated by "\r\n";
>[/color]

Actually '\n' should be enough, though I'm not sure... I've always used
'\n'.

Madsen

--
Anders K. Madsen --- http://lillesvin.linux.dk

"There are 10 types of people in the world.
Those who understand binary - and those who don't."

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA/u+BlNHJe/JASHcRAsGIAJwP0uhYlXgz8jaEIMxxhjKEeWAWNgCdHizG
SAxilL1DZ5gNp/KhK0tyAWc=
=sF6d
-----END PGP SIGNATURE-----

Pedro Graca
Guest
 
Posts: n/a
#4: Jul 17 '05

re: mail to bcc help please


Anders K. Madsen wrote:[color=blue]
> Pedro Graca <hexkid@hotpop.com> wrote:[color=green]
>> Headers should be separated by "\r\n";[/color]
>
> Actually '\n' should be enough, though I'm not sure... I've always used
> '\n'.[/color]

http://www.faqs.org/rfcs/rfc2821.html

See sections 2.3.7 (for the SMTP headers) and 4.1.1.4 (for the DATA part
of the mail, which includes the 4th parameter in the mail() function
used by PHP).


--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
fo
Guest
 
Posts: n/a
#5: Jul 17 '05

re: mail to bcc help please


Worked like a charm. many thanks Pedro !

well done

Thank you!!

FO

"Pedro Graca" <hexkid@hotpop.com> wrote in message
news:slrncfseip.1od.hexkid@ID-203069.user.uni-berlin.de...[color=blue]
> fo wrote:[color=green]
> > Hi I want to add one other emailrecepient to my mail code and can't seem[/color][/color]
to[color=blue]
> ...[color=green]
> > <emerge@goldcoastrentals.com.au>\nX-Mailer: PHP/" . phpversion());[/color]
>
> Headers should be separated by "\r\n";
>
>
> <?php
> $headers = array();
> $headers[] = 'From: "NSSA Customer Service"[/color]
<emerge@goldcoastrentals.com.au>';[color=blue]
> $headers[] = 'X-Mailer: PHP/' . phpversion();
> $headers[] = 'Bcc: <webmaster@goldcoastrentals.com.au>';
>
> // ...
>
> if (!mail($to, $sub, $body, implode("\r\n", $headers))) echo 'Error[/color]
sending mail.';[color=blue]
> ?>
>
>
> --
> USENET would be a better place if everybody read: | to email me: use |
> http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
> http://www.netmeister.org/news/learn2quote2.html | header, textonly |
> http://www.expita.com/nomime.html | no attachments. |[/color]


Closed Thread