html email showing <br> instead of line breaks
html email showing <br> instead of line breaks
am 24.09.2009 20:52:13 von Adam Williams
--------------010801080401060404090803
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I have users enter support tickets into a a
Re: html email showing <br> instead of line breaks
am 24.09.2009 20:55:42 von Jonathan Tapicer
\r\n should be between double quotes: "\r\n"
On Thu, Sep 24, 2009 at 3:52 PM, Adam Williams
wrote:
> I have users enter support tickets into a a
Re: html email showing <br> instead of line breaks
am 24.09.2009 21:00:06 von Adam Williams
Thanks, i'll try that. what is the difference in using '' and ""? I
thought they were interchangeable.
Jonathan Tapicer wrote:
> \r\n should be between double quotes: "\r\n"
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: html email showing <br> instead of line breaks
am 24.09.2009 21:03:38 von Adam Williams
oh nevermind, i see double quotes translate the \r\n to its appropriate
EOL character.
Adam Williams wrote:
> Thanks, i'll try that. what is the difference in using '' and ""? I
> thought they were interchangeable.
>
> Jonathan Tapicer wrote:
>> \r\n should be between double quotes: "\r\n"
>>
>>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: html email showing <br> instead of line breaks
am 24.09.2009 21:04:42 von Jonathan Tapicer
Double quotes accept special characters and string interpolation, see
the manual: http://php.net/manual/en/language.types.string.php
On Thu, Sep 24, 2009 at 4:00 PM, Adam Williams
wrote:
> Thanks, i'll try that. =A0what is the difference in using '' and ""? =A0I
> thought they were interchangeable.
>
> Jonathan Tapicer wrote:
>>
>> \r\n should be between double quotes: "\r\n"
>>
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: html email showing <br> instead of line breaks
am 24.09.2009 21:11:15 von Fernando Castillo Aparicio
--0-1910656736-1253819475=:65993
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Have you tried http://es.php.net/manual/en/function.nl2br.php ?
I thin=
k it's easier and fits your needs.
=0A__________________________=
______=0ADe: Adam Williams =0APara: PHP General =
list =0AEnviado: jueves, 24 de septiembre, 2009 =
20:52:13=0AAsunto: [PHP] html email showing
instead of line breaks=0A=
=0AI have users enter support tickets into a a
Re: html email showing <br> instead of line breaks
am 24.09.2009 21:12:11 von Ben Dunlap
>>> \r\n should be between double quotes: "\r\n"
I think you'll still see the literal "
"s in your final email,
though because htmlspecialchars() is converting the angle-brackets in
the tag to their respective HTML entities ("<" for "<" and ">"
for ">").
A bit of a thorny problem because you probably do want to escape
HTML-characters in the message for security purposes. I suppose you
could call str_replace() after htmlspecialchars(), instead of before
it as you currently do.
OTOH, why not just send your email as plain text, instead of HTML?
Thanks,
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php