Ask a Question related to PHP Development, Design and Development.
-
Ryan Ramsey #1
Problems with mail()
Im having a formatting issue with mail().
My simple script looks like:
$key = [email]blah@blah.com[/email];
$subject = "My membership";
$message_to_send = "<strong>Hello".$key."</strong>";
mail($key, $subject, $message_to_send, "From: [email]blah@blah.com[/email]");
When it comes to my email client it appears as:
<strong>Hello [email]blah@blah.com[/email]</strong>
Instead of:
Hello [email]blah@blah.com[/email]
I have also tried adding <html> and <body> tags but that doesn't seem to do anything.
I get other HMTL messages from amazon and such but it would appear that one generated from mail() is sending only raw text.
How do I get it to format HTML based message?
Ryan Ramsey Guest
-
CFMX 6 Mail Problems
We have been experiencing a number of issues related to CFMX 6's mail handling. Several applications have experienced issues with mail messages... -
e-Mail Problems
A .pdf document was created using InDesign CS. When the .pdf document was e-mailed to two individuals one was able to open and print the document but... -
problems with Mail::Mailer
I need to fix a script that sends out emails from my site using Mail::Mailer and send using the smtp method (which involkes Net::SMTP). The sender... -
PHP Mail Problems
BillyJoe wrote: I believe the From: needs a real existing email adress. -
Two problems...e-mail sending and DSN
It's been a while since I posted here, but here goes. Our server is a Windows 2000 Server with Service Pack 3, IIS 5 with Lockdown Wizard... -
Janwillem Borleffs #2
Re: Problems with mail()
"Ryan Ramsey" <ryanramsey@yahoo.com> schreef in bericht
news:bhZOa.875$5o5.577540@news1.news.adelphia.net. .......> Im having a formatting issue with mail().
>
>My simple script looks like:
>First of all: DO NOT send HTML mail to newsgroups!!! In your e-mail client>When it comes to my email client it appears as:
> <strong>Hello [email]blah@blah.com[/email]</strong>
>
>Instead of:
> Hello [email]blah@blah.com[/email]
there's a setting which allows you to select plain text a-mails for
newsgroups and HTML for others.
To answer your question: Use the the fourth argument of the mail() function
to send a content type header with text/html as the value:
mail($key, $subject, $message_to_send, "From: [email]blah@blah.com[/email]\nContent-Type:
text/html");
JW
Janwillem Borleffs Guest
-
Ryan Ramsey #3
Re: Problems with mail()
Ok here is another question...
It would seem that the mail() is injecting a "! " in the text of
$message_to_sender:
So text that should read:
There once were three bears that lived in a big black house.
Would look like:
There once were three bears that lived in a big blac! k house
Does this look familiar? Does mail() have an issue with the size of the
message being passed? If I increase the size of the text, the "! " will move
accordingly (im guessing at char 255).
"Esteban Fernández" <eft0@gmx.nospam.net> wrote in message
news:3f0c7ed3@omega.ifxnw.cl...do> Easy, just replace you mail line code, for thi one.
>
> mail($key, $subject, $message_to_send, "Content-Type: text/html\nFrom:
> [email]blah@blah.com[/email]");
>
> Regards.
> EF.
>
>
> "Ryan Ramsey" <ryanramsey@yahoo.com> escribió en el mensaje
> news:bhZOa.875$5o5.577540@news1.news.adelphia.net. ..
> Im having a formatting issue with mail().
>
> My simple script looks like:
>
> $key = [email]blah@blah.com[/email];
> $subject = "My membership";
> $message_to_send = "<strong>Hello".$key."</strong>";
>
> mail($key, $subject, $message_to_send, "From: [email]blah@blah.com[/email]");
>
> When it comes to my email client it appears as:
>
> <strong>Hello [email]blah@blah.com[/email]</strong>
>
> Instead of:
>
> Hello [email]blah@blah.com[/email]
>
> I have also tried adding <html> and <body> tags but that doesn't seem toone> anything.
> I get other HMTL messages from amazon and such but it would appear that> generated from mail() is sending only raw text.
> How do I get it to format HTML based message?
>
>
>
Ryan Ramsey Guest
-
Janwillem Borleffs #4
Re: Problems with mail()
"Ryan Ramsey" <ryanramsey@yahoo.com> wrote in message
news:xL0Pa.1079$5o5.639092@news1.news.adelphia.net ...move> Ok here is another question...
>
> It would seem that the mail() is injecting a "! " in the text of
> $message_to_sender:
>
> So text that should read:
>
> There once were three bears that lived in a big black house.
>
> Would look like:
>
> There once were three bears that lived in a big blac! k house
>
> Does this look familiar? Does mail() have an issue with the size of the
> message being passed? If I increase the size of the text, the "! " willA simple "Content-Type: text/html;charset=ISO-8859-1\n" should fix this.> accordingly (im guessing at char 255).
>
JW
Janwillem Borleffs Guest



Reply With Quote

