Page 1 of 1
strange one ">" appears in mail text
Posted: Wed May 07, 2003 7:25 pm
by andykent
Strange one this - we build up the body of a text message in php and when the email arrives, a ">" appears before one of the lines in the body - there is literally nowhere in the code that this appears - can't think why - shared with colleagues - has anyone come across this or know why this could be happening
Posted: Thu May 08, 2003 2:59 am
by sleepingdanny
Why don't you show us the code so we can help you
Posted: Thu May 08, 2003 4:21 am
by twigletmac
Is it an HTML e-mail? If it is you may have something like:
with an extra > being printed because there's an additional one in the code.
Mac
here is the code
Posted: Thu May 08, 2003 5:09 am
by andykent
$body = "Hi " . $firstname . " \n\n"
. "You are the latest person to join our adventures in the forest! It is so awesome to have you with us. All the bugs love receiving mail from the big outside world.\n\n"
. "You are going to really enjoy being part of the Buzz & Poppy club - its lots of fun, there's lots to do, and competitions with heaps of prizes to be won.\n\n"
. "As a member you need to know your membership number so you can get your special member's discount on products. Your number is BP". $memberid ."\n\n";
if ($country == "NZ") {
$body=$body. "To get you started, you can buy your membership pack which includes a soft toy, a colouring book and a video of 8 wild forest adventures! There is even an official membership certificate officially signed by Buzz & Poppy!\n" . "Check it out at
http://www.buzz-poppy.com/news/memberpack.htm\n\n" . "It is just $24.99! This is a very low price for club members only who live in New Zealand! Ask Mum or Dad to print out the order form from:\n" . "
www.buzz-poppy.com/news/orderform.htm \n";
}
$body = $body . "From all the bugs here - thanks for joining our club!\n\n"
. "See ya!!\n\n"
the > appears before "From all the bugs here" - so not sure where this comes from!
Posted: Thu May 08, 2003 5:13 am
by twigletmac
Does the > appear if you do:
after the variable has been built up?
Mac
delayed response!
Posted: Mon Jun 30, 2003 6:49 pm
by andykent
this is difficult to do - this page simply emails the user
there is no screen output for this one
I am sure this must be a bug - I managed to get this working for a while - then added another PERFECTLY valid statement to just add another line in and this made the > reappear again
Believe me I have checked EVERY character, tried options like /r/n as well as just /n for new line - I have added spaces, taken out various characters to try to highlight where the problem arises!
Obviously emailing myself $body gives the same > error!
Any other ideas?
Thanks
You're seeing an OLD bug in UNIX email processing...
Posted: Tue Jul 01, 2003 3:34 pm
by kenrbnsn
The code you have is fine. There's nothing you can do about it. For some reason most UNIX based email processors (sendmail, etc) think that a line starting with "From" is part of the message header and will put the ">" in front of the word.
AFAIK there is nothing you can do to prevent it from happening.

thanks!
Posted: Tue Jul 01, 2003 3:38 pm
by andykent
thats really helpful - thank you
at least I can change the word to see what happens!
Andy