PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Printing email
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Printing email

Réponse
 
LinkBack Outils de la discussion
Vieux 22/04/2008, 17h02   #1
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Printing email

Using mail($addr , $subject, $body);

When the email is printed, numerous blank pages print. Also the email has
many blank lines under the content.

How do I limit the email to content only?

Thanks.

Ken





  Réponse avec citation
Vieux 22/04/2008, 18h16   #2
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
> Using mail($addr , $subject, $body);
>
> When the email is printed, numerous blank pages print. Also the email has
> many blank lines under the content.
>
> How do I limit the email to content only?


Trim your $body, probably. Ain't a lot to go on here.

--
64. I will see a competent psychiatrist and get cured of all extremely
unusual phobias and bizarre compulsive habits which could prove to
be a disadvantage.
--Peter Anspach's list of things to do as an Evil Overlord
  Réponse avec citation
Vieux 22/04/2008, 18h57   #3
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

>Trim your $body, probably
The " is right after the last character in the $body. Do I need a character
to denote end of email?

>Ain't a lot to go on here

That's what I thought, too. But to my surprise, there are ten+ blank pages
after the text in both printing and the email.

My questions are:
1. Why the extra blank pages?
2. How do I eliminate them?

Ken




"Peter H. Coffin" <hellsop@ninehells.com> wrote in message
news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>> Using mail($addr , $subject, $body);
>>
>> When the email is printed, numerous blank pages print. Also the email
>> has
>> many blank lines under the content.
>>
>> How do I limit the email to content only?

>
> Trim your $body, probably. Ain't a lot to go on here.
>
> --
> 64. I will see a competent psychiatrist and get cured of all extremely
> unusual phobias and bizarre compulsive habits which could prove to
> be a disadvantage.
> --Peter Anspach's list of things to do as an Evil Overlord



  Réponse avec citation
Vieux 22/04/2008, 19h17   #4
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>> Using mail($addr , $subject, $body);
>>>
>>> When the email is printed, numerous blank pages print. Also the email
>>> has
>>> many blank lines under the content.
>>>
>>> How do I limit the email to content only?

>>
>> Trim your $body, probably.

> The " is right after the last character in the $body. Do I need a
> character
> to denote end of email?


Nope.

>> Ain't a lot to go on here

> That's what I thought, too.


"Ain't a lot to go on here" meaning: we cannot say what is wrong without
the code, this is NOT usual behaviour.
--
Rik Wasmus
  Réponse avec citation
Vieux 22/04/2008, 19h58   #5
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email


"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
newsp.t90yfoq25bnjuv@metallium.lan...
> On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
>> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
>> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>>> Using mail($addr , $subject, $body);
>>>>
>>>> When the email is printed, numerous blank pages print. Also the email
>>>> has
>>>> many blank lines under the content.
>>>>
>>>> How do I limit the email to content only?
>>>
>>> Trim your $body, probably.

>> The " is right after the last character in the $body. Do I need a
>> character
>> to denote end of email?

>
> Nope.
>
>>> Ain't a lot to go on here

>> That's what I thought, too.

>
> "Ain't a lot to go on here" meaning: we cannot say what is wrong without
> the code, this is NOT usual behaviour.
> --
> Rik Wasmus


The simiplied code

$body = " Application for Membership ..... \n\n Today's date
$date \n";

$addr = "name@domain.com, {$_SESSION['check_email']}";
$subjectF = "subject name";
mail($addr , $subjectF, $body);
header ('Location: http://domainname/file.php');



  Réponse avec citation
Vieux 22/04/2008, 20h01   #6
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

On Tue, 22 Apr 2008 20:58:20 +0200, Ken <dadk@wi.rr.com> wrote:

>
> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
> newsp.t90yfoq25bnjuv@metallium.lan...
>> On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
>>> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
>>> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>>>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>>>> Using mail($addr , $subject, $body);
>>>>>
>>>>> When the email is printed, numerous blank pages print. Also the
>>>>> email
>>>>> has
>>>>> many blank lines under the content.
>>>>>
>>>>> How do I limit the email to content only?
>>>>
>>>> Trim your $body, probably.
>>> The " is right after the last character in the $body. Do I need a
>>> character
>>> to denote end of email?

>>
>> Nope.
>>
>>>> Ain't a lot to go on here
>>> That's what I thought, too.

>>
>> "Ain't a lot to go on here" meaning: we cannot say what is wrong without
>> the code, this is NOT usual behaviour.

>
> The simiplied code
>
> $body = " Application for Membership ..... \n\n Today's date
> $date \n";
>
> $addr = "name@domain.com, {$_SESSION['check_email']}";


What's in $_SESSION['check_email']?

> $subjectF = "subject name";
> mail($addr , $subjectF, $body);


Does nothing weird like described here. Perhaps the NOT 'simiplied' code
would server better...
--
Rik Wasmus
  Réponse avec citation
Vieux 22/04/2008, 20h26   #7
Paul Lautman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

Ken wrote:
> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
> newsp.t90yfoq25bnjuv@metallium.lan...
>> On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
>>> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
>>> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>>>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>>>> Using mail($addr , $subject, $body);
>>>>>
>>>>> When the email is printed, numerous blank pages print. Also the
>>>>> email has
>>>>> many blank lines under the content.
>>>>>
>>>>> How do I limit the email to content only?
>>>>
>>>> Trim your $body, probably.
>>> The " is right after the last character in the $body. Do I need a
>>> character
>>> to denote end of email?

>>
>> Nope.
>>
>>>> Ain't a lot to go on here
>>> That's what I thought, too.

>>
>> "Ain't a lot to go on here" meaning: we cannot say what is wrong
>> without the code, this is NOT usual behaviour.
>> --
>> Rik Wasmus

>
> The simiplied code
>
> $body = " Application for Membership ..... \n\n Today's
> date $date \n";
>
> $addr = "name@domain.com, {$_SESSION['check_email']}";
> $subjectF = "subject name";
> mail($addr , $subjectF, $body);
> header ('Location: http://domainname/file.php');


in response to simiplied [SIC] code, we can only give simiplied [SIC]
answers. There must be something wrong. Is that simipli enough?


  Réponse avec citation
Vieux 22/04/2008, 20h28   #8
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email


"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
newsp.t900f0mp5bnjuv@metallium.lan...
On Tue, 22 Apr 2008 20:58:20 +0200, Ken <dadk@wi.rr.com> wrote:

>
> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
> newsp.t90yfoq25bnjuv@metallium.lan...
>> On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
>>> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
>>> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>>>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>>>> Using mail($addr , $subject, $body);
>>>>>
>>>>> When the email is printed, numerous blank pages print. Also the
>>>>> email
>>>>> has
>>>>> many blank lines under the content.
>>>>>
>>>>> How do I limit the email to content only?
>>>>
>>>> Trim your $body, probably.
>>> The " is right after the last character in the $body. Do I need a
>>> character
>>> to denote end of email?

>>
>> Nope.
>>
>>>> Ain't a lot to go on here
>>> That's what I thought, too.

>>
>> "Ain't a lot to go on here" meaning: we cannot say what is wrong without
>> the code, this is NOT usual behaviour.

>
> The simplified code
>
> $body = " Application for Membership ..... \n\n Today's date
> $date \n";
>
> $addr = "name@domain.com, {$_SESSION['check_email']}";


What's in $_SESSION['check_email']?

> $subjectF = "subject name";
> mail($addr , $subjectF, $body);


Does nothing weird like described here. Perhaps the NOT 'simplified code
would server better...
--
Rik Wasmus

-----------------
I have two emailing on the same page

the first
> $body = " Application for Membership ..... \n\n Today's date
> $date \n";
> $addr = "name@domain.com, {$_SESSION['check_email']}";
> $subject = "subject name";
> mail($addr , $subject, $body);


The second:
> $body2 = " Different text";
> $addr = "name@domain.com, {$_SESSION['check_email']}";
> $subjectF = "subject name2";
> mail($addr , $subjectF, $bod2);


Could two mailing on the same page cause the problem?

>What's in $_SESSION['check_email']?

This is a session variable entered into a form several pages earlier. The
variable is carried among pages.

Ken


  Réponse avec citation
Vieux 22/04/2008, 20h47   #9
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email


"Ken" <dadk@wi.rr.com> wrote in message
news:480e3c40$0$20183$4c368faf@roadrunner.com...
>
> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
> newsp.t900f0mp5bnjuv@metallium.lan...
> On Tue, 22 Apr 2008 20:58:20 +0200, Ken <dadk@wi.rr.com> wrote:
>
>>
>> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
>> newsp.t90yfoq25bnjuv@metallium.lan...
>>> On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
>>>> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
>>>> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>>>>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>>>>> Using mail($addr , $subject, $body);
>>>>>>
>>>>>> When the email is printed, numerous blank pages print. Also the
>>>>>> email
>>>>>> has
>>>>>> many blank lines under the content.
>>>>>>
>>>>>> How do I limit the email to content only?
>>>>>
>>>>> Trim your $body, probably.
>>>> The " is right after the last character in the $body. Do I need a
>>>> character
>>>> to denote end of email?
>>>
>>> Nope.
>>>
>>>>> Ain't a lot to go on here
>>>> That's what I thought, too.
>>>
>>> "Ain't a lot to go on here" meaning: we cannot say what is wrong without
>>> the code, this is NOT usual behaviour.

>>
>> The simplified code
>>
>> $body = " Application for Membership ..... \n\n Today's date
>> $date \n";
>>
>> $addr = "name@domain.com, {$_SESSION['check_email']}";

>
> What's in $_SESSION['check_email']?
>
>> $subjectF = "subject name";
>> mail($addr , $subjectF, $body);

>
> Does nothing weird like described here. Perhaps the NOT 'simplified code
> would server better...
> --
> Rik Wasmus
>
> -----------------
> I have two emailing on the same page
>
> the first
>> $body = " Application for Membership ..... \n\n Today's date
>> $date \n";
>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>> $subject = "subject name";
>> mail($addr , $subject, $body);

>
> The second:
>> $body2 = " Different text";
>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>> $subjectF = "subject name2";
>> mail($addr , $subjectF, $bod2);

>
> Could two mailing on the same page cause the problem?
>
>>What's in $_SESSION['check_email']?

> This is a session variable entered into a form several pages earlier. The
> variable is carried among pages.
>
> Ken

I tried one email on the page . Did not eliminate the blank lines.

You mentioned, this is not unusual.

What were the causes of the other instances of numerous blank lines in an
email.

Ken


  Réponse avec citation
Vieux 22/04/2008, 21h12   #10
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

On Tue, 22 Apr 2008 21:47:26 +0200, Ken <dadk@wi.rr.com> wrote:
>> I have two emailing on the same page
>>
>> the first
>>> $body = " Application for Membership ..... \n\n Today'sdate
>>> $date \n";
>>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>>> $subject = "subject name";
>>> mail($addr , $subject, $body);

>>
>> The second:
>>> $body2 = " Different text";
>>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>>> $subjectF = "subject name2";
>>> mail($addr , $subjectF, $bod2);

>>
>> Could two mailing on the same page cause the problem?
>>
>>> What's in $_SESSION['check_email']?

>> This is a session variable entered into a form several pages earlier.
>> The
>> variable is carried among pages.
>>
>> Ken

> I tried one email on the page . Did not eliminate the blank lines.
>
> You mentioned, this is not unusual.


No, I mentioned this was not usual. As in 'does not happen normally'.

> What were the causes of the other instances of numerous blank lines inan
> email.


- wrong headers
- other values in data then you expect.
- faulty MTA

So, try this:
mail('youremailaddres@example.com','Subject',"Line with break on end\n");

If this works, almost certainly there's something in $body or
$_SESSION['check_email'] you don't expect, examine those variables
carefully. If this also gives you faulty emails, please confirm with
another emailclient to be certain it's not the client's fault, and if so,
examine the source of the email.
--
Rik Wasmus
  Réponse avec citation
Vieux 22/04/2008, 21h20   #11
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email


"Paul Lautman" <paul.lautman@btinternet.com> wrote in message
news:676u8dF2njoq8U1@mid.individual.net...
> Ken wrote:
>> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
>> newsp.t90yfoq25bnjuv@metallium.lan...
>>> On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
>>>> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
>>>> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>>>>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>>>>> Using mail($addr , $subject, $body);
>>>>>>
>>>>>> When the email is printed, numerous blank pages print. Also the
>>>>>> email has
>>>>>> many blank lines under the content.
>>>>>>
>>>>>> How do I limit the email to content only?
>>>>>
>>>>> Trim your $body, probably.
>>>> The " is right after the last character in the $body. Do I need a
>>>> character
>>>> to denote end of email?
>>>
>>> Nope.
>>>
>>>>> Ain't a lot to go on here
>>>> That's what I thought, too.
>>>
>>> "Ain't a lot to go on here" meaning: we cannot say what is wrong
>>> without the code, this is NOT usual behaviour.
>>> --
>>> Rik Wasmus

>>
>> The simiplied code
>>
>> $body = " Application for Membership ..... \n\n Today's
>> date $date \n";
>>
>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>> $subjectF = "subject name";
>> mail($addr , $subjectF, $body);
>> header ('Location: http://domainname/file.php');

>
> in response to simiplied [SIC] code, we can only give simiplied [SIC]
> answers. There must be something wrong. Is that simipli enough?

OK but what is wrong?

This code caused the same problem.

$body="the";
$addr = "namei@domain.com";
$subject = "subject";
mail($addr , $subject, $body);

Your thoughts.

Ken


  Réponse avec citation
Vieux 22/04/2008, 21h36   #12
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email


"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
newsp.t903q3cm5bnjuv@metallium.lan...
On Tue, 22 Apr 2008 21:47:26 +0200, Ken <dadk@wi.rr.com> wrote:
>> I have two emailing on the same page
>>
>> the first
>>> $body = " Application for Membership ..... \n\n Today's date
>>> $date \n";
>>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>>> $subject = "subject name";
>>> mail($addr , $subject, $body);

>>
>> The second:
>>> $body2 = " Different text";
>>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>>> $subjectF = "subject name2";
>>> mail($addr , $subjectF, $bod2);

>>
>> Could two mailing on the same page cause the problem?
>>
>>> What's in $_SESSION['check_email']?

>> This is a session variable entered into a form several pages earlier.
>> The
>> variable is carried among pages.
>>
>> Ken

> I tried one email on the page . Did not eliminate the blank lines.
>
> You mentioned, this is not unusual.


No, I mentioned this was not usual. As in 'does not happen normally'.

> What were the causes of the other instances of numerous blank lines in an
> email.


- wrong headers
- other values in data then you expect.
- faulty MTA

So, try this:
mail('youremailaddres@example.com','Subject',"Line with break on end\n");

If this works, almost certainly there's something in $body or
$_SESSION['check_email'] you don't expect, examine those variables
carefully. If this also gives you faulty emails, please confirm with
another emailclient to be certain it's not the client's fault, and if so,
examine the source of the email.
--
Rik Wasmus

Rik
What is MTA?


  Réponse avec citation
Vieux 22/04/2008, 21h51   #13
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email


"Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
newsp.t903q3cm5bnjuv@metallium.lan...
On Tue, 22 Apr 2008 21:47:26 +0200, Ken <dadk@wi.rr.com> wrote:
>> I have two emailing on the same page
>>
>> the first
>>> $body = " Application for Membership ..... \n\n Today's date
>>> $date \n";
>>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>>> $subject = "subject name";
>>> mail($addr , $subject, $body);

>>
>> The second:
>>> $body2 = " Different text";
>>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>>> $subjectF = "subject name2";
>>> mail($addr , $subjectF, $bod2);

>>
>> Could two mailing on the same page cause the problem?
>>
>>> What's in $_SESSION['check_email']?

>> This is a session variable entered into a form several pages earlier.
>> The
>> variable is carried among pages.
>>
>> Ken

> I tried one email on the page . Did not eliminate the blank lines.
>
> You mentioned, this is not unusual.


No, I mentioned this was not usual. As in 'does not happen normally'.

> What were the causes of the other instances of numerous blank lines in an
> email.


- wrong headers
- other values in data then you expect.
- faulty MTA

So, try this:
mail('youremailaddres@example.com','Subject',"Line with break on end\n");

If this works, almost certainly there's something in $body or
$_SESSION['check_email'] you don't expect, examine those variables
carefully. If this also gives you faulty emails, please confirm with
another emailclient to be certain it's not the client's fault, and if so,
examine the source of the email.
--
Rik Wasmus

Rik,
I figured the problem out.

The reason for the extra lines: The text of the email does not end with a
period.

Look at your other emails. I found those with text ending in a period do
not have the extra lines.

Place a period after your signature.

Thanks for you !

Ken


  Réponse avec citation
Vieux 22/04/2008, 21h59   #14
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

On Tue, 22 Apr 2008 22:51:45 +0200, Ken <dadk@wi.rr.com> wrote:
> I figured the problem out.
> The reason for the extra lines: The text of the email does not end with
> a period.
> Look at your other emails. I found those with text ending in a period do
> not have the extra lines.
> Place a period after your signature.


Change mail and/or news client now. An ending period is never ever needed,
if your client needs it, it is broken and should not be trusted.

Also, use an news client which:
- properly quotes
- possibly trims signatures, or do it yourself.

The combination on non compliance to both of those makes it quite
irritating for me to reply to you as everything below the correct sig
seperator is considered a signature and automatically trimmed.

If you're not willing to change, at least use OE Quotefix:
http://home.in.tum.de/~jain/software/oe-quotefix/
--
Rik Wasmus
  Réponse avec citation
Vieux 22/04/2008, 23h24   #15
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

Ken wrote:
> "Paul Lautman" <paul.lautman@btinternet.com> wrote in message
> news:676u8dF2njoq8U1@mid.individual.net...
>> Ken wrote:
>>> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
>>> newsp.t90yfoq25bnjuv@metallium.lan...
>>>> On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
>>>>> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
>>>>> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>>>>>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>>>>>> Using mail($addr , $subject, $body);
>>>>>>>
>>>>>>> When the email is printed, numerous blank pages print. Also the
>>>>>>> email has
>>>>>>> many blank lines under the content.
>>>>>>>
>>>>>>> How do I limit the email to content only?
>>>>>> Trim your $body, probably.
>>>>> The " is right after the last character in the $body. Do I need a
>>>>> character
>>>>> to denote end of email?
>>>> Nope.
>>>>
>>>>>> Ain't a lot to go on here
>>>>> That's what I thought, too.
>>>> "Ain't a lot to go on here" meaning: we cannot say what is wrong
>>>> without the code, this is NOT usual behaviour.
>>>> --
>>>> Rik Wasmus
>>> The simiplied code
>>>
>>> $body = " Application for Membership ..... \n\n Today's
>>> date $date \n";
>>>
>>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>>> $subjectF = "subject name";
>>> mail($addr , $subjectF, $body);
>>> header ('Location: http://domainname/file.php');

>> in response to simiplied [SIC] code, we can only give simiplied [SIC]
>> answers. There must be something wrong. Is that simipli enough?

> OK but what is wrong?
>
> This code caused the same problem.
>
> $body="the";
> $addr = "namei@domain.com";
> $subject = "subject";
> mail($addr , $subject, $body);
>
> Your thoughts.
>
> Ken
>
>
>


If that causes lots of extra lines, then you probably have a problem in
your mail program on the server. It shouldn't be doing that.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 23/04/2008, 14h50   #16
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Printing email

On Tue, 22 Apr 2008 15:20:39 -0500, Ken wrote:
>
> "Paul Lautman" <paul.lautman@btinternet.com> wrote in message
> news:676u8dF2njoq8U1@mid.individual.net...
>> Ken wrote:
>>> "Rik Wasmus" <luiheidsgoeroe@hotmail.com> wrote in message
>>> newsp.t90yfoq25bnjuv@metallium.lan...
>>>> On Tue, 22 Apr 2008 19:57:25 +0200, Ken <dadk@wi.rr.com> wrote:
>>>>> "Peter H. Coffin" <hellsop@ninehells.com> wrote in message
>>>>> news:slrng0s7c9.set.hellsop@abyss.ninehells.com...
>>>>>> On Tue, 22 Apr 2008 11:02:57 -0500, Ken wrote:
>>>>>>> Using mail($addr , $subject, $body);
>>>>>>>
>>>>>>> When the email is printed, numerous blank pages print. Also the
>>>>>>> email has
>>>>>>> many blank lines under the content.
>>>>>>>
>>>>>>> How do I limit the email to content only?
>>>>>>
>>>>>> Trim your $body, probably.
>>>>> The " is right after the last character in the $body. Do I need a
>>>>> character
>>>>> to denote end of email?
>>>>
>>>> Nope.
>>>>
>>>>>> Ain't a lot to go on here
>>>>> That's what I thought, too.
>>>>
>>>> "Ain't a lot to go on here" meaning: we cannot say what is wrong
>>>> without the code, this is NOT usual behaviour.
>>>> --
>>>> Rik Wasmus
>>>
>>> The simiplied code
>>>
>>> $body = " Application for Membership ..... \n\n Today's
>>> date $date \n";
>>>
>>> $addr = "name@domain.com, {$_SESSION['check_email']}";
>>> $subjectF = "subject name";
>>> mail($addr , $subjectF, $body);
>>> header ('Location: http://domainname/file.php');

>>
>> in response to simiplied [SIC] code, we can only give simiplied [SIC]
>> answers. There must be something wrong. Is that simipli enough?

> OK but what is wrong?
>
> This code caused the same problem.
>
> $body="the";
> $addr = "namei@domain.com";
> $subject = "subject";
> mail($addr , $subject, $body);
>
> Your thoughts.


On my handy test system,

<?php
$body="the";
$addr = "hellsop@ninehells.com";
$subject = "subject";
mail($addr , $subject, $body);
?>

results in

------------------------
From hellsop@ninehells.com Wed Apr 23 08:45:41 2008
Return-Path: hellsop@ninehells.com
X-Original-To: hellsop@ninehells.com
Delivered-To: hellsop@ninehells.com
Received: by abyss.ninehells.com (Postfix, from userid 1000)
id 8166712A63; Wed, 23 Apr 2008 08:45:41 -0500 (CDT)
To: hellsop@ninehells.com
Subject: subject
Message-Id: <20080423134541.8166712A63@abyss.ninehells.com>
Date: Wed, 23 Apr 2008 08:45:41 -0500 (CDT)
From: "Peter H. Coffin" <hellsop@ninehells.com>
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.0.3

the
------------------------

exactly. Try another mail client, one that can show you exactly what's
in the email. If that's okay, it's your printing system. If it's not
okay, it's your email system someplace, including such filters as you
may have placed on it. In any case, it's not a flaw in PHP generally,
nor in the code you've presented.

--
84. I will not have captives of one sex guarded by members of the opposite sex.
--Peter Anspach's list of things to do as an Evil Overlord
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h45.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,35304 seconds with 24 queries