0
php email form with styling
Community Beginner
,
/t5/dreamweaver-discussions/php-email-form-with-styling/td-p/504739
Dec 19, 2007
Dec 19, 2007
Copy link to clipboard
Copied
Hi
I have a php file which generates an email from a form in a website I have designed. I just want to make some areas of the final generated email in bold text. I know if people have plain text only selected in their email client they won't see the bold text, but at least it will reach a certain percentage of users.
the line in question is -
$body ="Booking request details from website:\n\n";
I have tried putting <b></b> and <strong></strong>, inside the inverted commas, outside etc, plus tried different declarations within the <head>, nothing works! What am I doing wrong?
I am a beginner with this php stuff, please be kind!
Thanks
I have a php file which generates an email from a form in a website I have designed. I just want to make some areas of the final generated email in bold text. I know if people have plain text only selected in their email client they won't see the bold text, but at least it will reach a certain percentage of users.
the line in question is -
$body ="Booking request details from website:\n\n";
I have tried putting <b></b> and <strong></strong>, inside the inverted commas, outside etc, plus tried different declarations within the <head>, nothing works! What am I doing wrong?
I am a beginner with this php stuff, please be kind!
Thanks
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/php-email-form-with-styling/m-p/504740#M184124
Dec 19, 2007
Dec 19, 2007
Copy link to clipboard
Copied
BarryGBrown wrote:
> I have a php file which generates an email from a form in a website I have
> designed. I just want to make some areas of the final generated email in bold
> text. I know if people have plain text only selected in their email client they
> won't see the bold text, but at least it will reach a certain percentage of
> users.
The PHP mail() function sends plain text only.
> I am a beginner with this php stuff, please be kind!
The best advice to a PHP beginner is to start learning to read the
online documentation. Although the mail() function sends plain text
only, there is an example in the documentation that shows you how to
send an HTML email:
http://docs.php.net/manual/en/function.mail.php
The problem with the PHP online documentation is that it's huge -
definitely not something you could sit down and try to read from end to
end. However, whenever you come across a new function, it's always a
good idea to look it up. You'll find a lot of helpful examples there.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
> I have a php file which generates an email from a form in a website I have
> designed. I just want to make some areas of the final generated email in bold
> text. I know if people have plain text only selected in their email client they
> won't see the bold text, but at least it will reach a certain percentage of
> users.
The PHP mail() function sends plain text only.
> I am a beginner with this php stuff, please be kind!
The best advice to a PHP beginner is to start learning to read the
online documentation. Although the mail() function sends plain text
only, there is an example in the documentation that shows you how to
send an HTML email:
http://docs.php.net/manual/en/function.mail.php
The problem with the PHP online documentation is that it's huge -
definitely not something you could sit down and try to read from end to
end. However, whenever you come across a new function, it's always a
good idea to look it up. You'll find a lot of helpful examples there.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/php-email-form-with-styling/m-p/504741#M184126
Dec 19, 2007
Dec 19, 2007
Copy link to clipboard
Copied
.oO(BarryGBrown)
> I have a php file which generates an email from a form in a website I have
>designed. I just want to make some areas of the final generated email in bold
>text. I know if people have plain text only selected in their email client they
>won't see the bold text, but at least it will reach a certain percentage of
>users.
You can't do bold text in a normal email. Plain text is just that -
plain text. For anything more you need HTML. _If_ you should need it.
Usually plain text serves pretty well and is the most efficient way.
> the line in question is -
>
> $body ="Booking request details from website:\n\n";
>
> I have tried putting and ,
syntax is used in some forum software, but besides that it has
no meaning whatsoever.
>inside the inverted commas, outside
>etc, plus tried different declarations within the <head>, nothing works! What
>am I doing wrong?
You would have to create an entire HTML email with all the required
headers and boundaries. Quite difficult to do by hand with PHP's mail()
function.
> I am a beginner with this php stuff, please be kind!
Then you should start simple with plain text. There are some classes out
there which make it easy to generate text and HTML emails (phpmailer for
example), but you should be familiar with PHP coding if you want to use
them.
Micha
> I have a php file which generates an email from a form in a website I have
>designed. I just want to make some areas of the final generated email in bold
>text. I know if people have plain text only selected in their email client they
>won't see the bold text, but at least it will reach a certain percentage of
>users.
You can't do bold text in a normal email. Plain text is just that -
plain text. For anything more you need HTML. _If_ you should need it.
Usually plain text serves pretty well and is the most efficient way.
> the line in question is -
>
> $body ="Booking request details from website:\n\n";
>
> I have tried putting and ,
syntax is used in some forum software, but besides that it has
no meaning whatsoever.
>inside the inverted commas, outside
>etc, plus tried different declarations within the <head>, nothing works! What
>am I doing wrong?
You would have to create an entire HTML email with all the required
headers and boundaries. Quite difficult to do by hand with PHP's mail()
function.
> I am a beginner with this php stuff, please be kind!
Then you should start simple with plain text. There are some classes out
there which make it easy to generate text and HTML emails (phpmailer for
example), but you should be familiar with PHP coding if you want to use
them.
Micha
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

