I had to go look at PHPMailer and I don't think it's your problem. I
have a feeling there's more code. It sounds like your using an array
inside quotes, but the array isn't an array anymore or something like that.
ie:
# arrays need to be _outside_ quotes (mistake 1), but
# we don't notice it not getting evaluated because plain
# old $arrayVar has a value of "Value" (mistake 2). Thus
# we see that instead with the "[1]" on the end
$arrayVar = array ("ArrVal1", "ArrVal2"); #originally an array
$arrayVar= "Value"; # not an array anymore
print "$arrayVar[1]"; # if it was an array it should not have the
quotes (")
#this will print "Value[1]" on the page
Kind of two syntax errors together that won't trigger a hard PHP error.
What's the code for the loop it's in? - if it is in a loop as I suspect
(ie: for, while, foreach). How are you calling AddAddress()?
If it is using the code you posted then you're adding the [#] when you
call it. If it's showing up out of nowhere, you can truncate the "[#]"
from the end something like so:
$emailAddy = "[EMAIL PROTECTED]";
$emailAddy = ereg_replace("^.*\[[0-9]*\]$", "", $emailAddy); # this
will strip the "[1]" off
print $emailAddy;
I haven't had a chance to try that regular expression
("ereg_replace()"), but it should clear out the brackets and the number.
If not, let me know or take a look at
http://us3.php.net/manual/en/function.ereg-replace.php and "The Tao of
Regular Expressions", of which I have a copy posted at
http://dox.networkoftheapes.net.
Bryn
----- Original Message -----
Subject: [xmail] Re: Problem sending mail from PHP
Date: Wed, 1 Jun 2005 08:30:03 +0800
From: "ST Ooi"
Hi,
The email address is [EMAIL PROTECTED], I don't know why it convert to
[EMAIL PROTECTED] after sending to the group.
Thanks
ST Ooi
----- Original Message -----
From: "CLEMENT Francis"
To:
Sent: 31/05/2005 18:13
Subject: [xmail] Re: Problem sending mail from PHP
>
>
> > -----Message d'origine-----
> > De : ST Ooi [mailto:[EMAIL PROTECTED]
> > Envoy=E9 : mardi 31 mai 2005 09:23
> > =C0 : [email protected]
> > Objet : [xmail] Problem sending mail from PHP
> >=20
> >=20
> > $mail->From =3D "[EMAIL PROTECTED]";
> > $mail->AddAddress("[EMAIL PROTECTED]", "Patrick Ooi");
> > $mail->AddReplyTo("[EMAIL PROTECTED]", "ST Ooi");
>
> Not a php specialist (never written a single line in php) but emails =
> are not
> compliants to rfc's
> At smtp level '[1]' or '[2]' or '[3]' at end of an email address is not =
> a
> valid domain name :)
> If it is 'php' or PHPMailer specific ... put my post in the trash ... =
> :)
>
> Francis
>
> -
> To unsubscribe from this list: send the line "unsubscribe xmail" in
> the body of a message to [EMAIL PROTECTED]
> For general help: send the line "help" in the body of a message to
> [EMAIL PROTECTED]
>
-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]