FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » mail function and wordwrap
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: mail function and wordwrap [message #172267 is a reply to message #172260] Tue, 08 February 2011 19:55 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 2/8/2011 9:12 AM, Bill B wrote:
> On 2/8/2011 9:07 AM, Jerry Stuckle wrote:
>> On 2/8/2011 8:44 AM, Bill B wrote:
>>> On 2/8/2011 8:34 AM, Jerry Stuckle wrote:
>>>> On 2/8/2011 8:19 AM, Bill B wrote:
>>>> > I have looked through php.net (and googled) without finding an example
>>>> > of this particular scenario.
>>>> >
>>>> > If the message is the result of:
>>>> >
>>>> > $msg = "A very long sentence\n";
>>>> > $msg .= "A short sentence\n"; // less than 70 characters
>>>> > $msg .= "Another short sentence\n"; // less than 70 characters
>>>> > $msg .= "Another very long sentence";
>>>> >
>>>> > $msg = wordwrap($msg, 70);
>>>> >
>>>> > Does wordwrap only act on the longer individual strings? Will the
>>>> > short
>>>> > strings appear on lines of their own?
>>>> >
>>>> > In other words, will the formatting (\n) in each string taken
>>>> > separately
>>>> > override the overall wordwrap?
>>>> >
>>>> > Thank you,
>>>> >
>>>> > Bill B
>>>>
>>>> Did you try it?
>>>>
>>>
>>> No. Is that the standard?
>>>
>>> I am using this in a "listening" script that is triggered by receiving a
>>> notice from PayPal. The PayPal information supplies the variables for
>>> the mail function, including the customer's email address. Based on the
>>> transaction type a different message is composed. There are about 10
>>> different messages of differing content and formatting.
>>>
>>> That is difficult to test repeatedly so I turned to this group. If you
>>> think that is misguided, then pass on responding.
>>>
>>> Bill B
>>
>> If you want to know if a function does something specific, the
>> "standard" is to write a short test script using the function and see if
>> it works like you think it will.
>>
>
> Noted. So I should look to see that everyone who writes to the group for
> help provides such evidence, regardless of the complexity of their
> problem. Correspondingly, I should fail to see anyone, especially you,
> offering suggestions or help in the absence of such evidence. That about
> right?
>
> Bill B

No, but which is easier - writing a five line script to test it
yourself, or composing a question, posting it to usenet and waiting a
day or two for a response?

Your question is so easy to test locally it isn't even funny.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: An extremely large hash lookup mechanism
Next Topic: Unexpected error in log: php_gd2.dll
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 14:51:39 GMT 2024

Total time taken to generate the page: 0.02872 seconds