Using phpMailer & HTML

I'm using the following line of php code and would like to incorporate
a little HTML in order to get line breaks <br> and bold headers <b></
b> where I want. Anyone know how to make that happen?

current:
$mail->Body = ("From: $name, Area: $area, Issue: $issue");

would like to get something as follows:
$mail->Body = ("<b>From:</b> $name,<br><b>Area:</b>
$area,<br><b>Issue:</b> $issue");

Thanks,
John
jcage [ Sa, 28 April 2007 16:52 ] [ ID #1700197 ]

Re: Using phpMailer & HTML

On Apr 28, 3:52 pm, j... [at] lycos.com wrote:
> I'm using the following line of php code and would like to incorporate
> a little HTML in order to get line breaks <br> and bold headers <b></
> b> where I want. Anyone know how to make that happen?
>
> current:
> $mail->Body = ("From: $name, Area: $area, Issue: $issue");
>
> would like to get something as follows:
> $mail->Body = ("<b>From:</b> $name,<br><b>Area:</b>
> $area,<br><b>Issue:</b> $issue");
>
> Thanks,
> John


$mail->IsHTML(true);
shimmyshack [ Sa, 28 April 2007 17:31 ] [ ID #1700200 ]

Re: Using phpMailer & HTML

<jcage [at] lycos.com> wrote in message
news:1177771972.418467.122750 [at] n76g2000hsh.googlegroups.com.. .
> I'm using the following line of php code and would like to incorporate
> a little HTML in order to get line breaks <br> and bold headers <b></
> b> where I want. Anyone know how to make that happen?
>
> current:
> $mail->Body = ("From: $name, Area: $area, Issue: $issue");
>
> would like to get something as follows:
> $mail->Body = ("<b>From:</b> $name,<br><b>Area:</b>
> $area,<br><b>Issue:</b> $issue");
>
> Thanks,
> John
>

Hmmm, if I were you, apart from the unnesessary brackets, I would probably
do what you have done,
I would make sure I was using the Send as HTML as below.
$mail->IsHTML(true); as you might not have done.
Then, if that didn't work, I might ask someone on here, as you have done.
And then I might find you answering me as I have done.
But then again, I'm not you :)
Vince
Vince Morgan [ Sa, 28 April 2007 17:50 ] [ ID #1700201 ]

Re: Using phpMailer & HTML

"Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
And, if I had refreshed the post first I would not have replayed, as
simmyshack has already done.
Vince Morgan [ Sa, 28 April 2007 17:54 ] [ ID #1700202 ]

Re: Using phpMailer & HTML

On Apr 28, 4:54 pm, "Vince Morgan" <vin... [at] REMOVEoptusnet.com.au>
wrote:
> "Vince Morgan" <vin... [at] REMOVEoptusnet.com.au> wrote in message
>
> news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
> And, if I had refreshed the post first I would not have replayed, as
> simmyshack has already done.

ah but i didnt mention the brackets Vince!, well spotted!

btw john, phpmailer has great documentation, as well as example code
which shows all this!
shimmyshack [ Sa, 28 April 2007 18:16 ] [ ID #1700203 ]

Re: Using phpMailer & HTML

On Apr 28, 3:52 pm, j... [at] lycos.com wrote:
> I'm using the following line of php code and would like to incorporate
> a little HTML in order to get line breaks <br> and bold headers <b></
> b> where I want. Anyone know how to make that happen?
>
> current:
> $mail->Body = ("From: $name, Area: $area, Issue: $issue");
>
> would like to get something as follows:
> $mail->Body = ("<b>From:</b> $name,<br><b>Area:</b>
> $area,<br><b>Issue:</b> $issue");
>
> Thanks,
> John


$mail->IsHTML(true);
shimmyshack [ Sa, 28 April 2007 17:31 ] [ ID #1700242 ]

Re: Using phpMailer & HTML

<jcage [at] lycos.com> wrote in message
news:1177771972.418467.122750 [at] n76g2000hsh.googlegroups.com.. .
> I'm using the following line of php code and would like to incorporate
> a little HTML in order to get line breaks <br> and bold headers <b></
> b> where I want. Anyone know how to make that happen?
>
> current:
> $mail->Body = ("From: $name, Area: $area, Issue: $issue");
>
> would like to get something as follows:
> $mail->Body = ("<b>From:</b> $name,<br><b>Area:</b>
> $area,<br><b>Issue:</b> $issue");
>
> Thanks,
> John
>

Hmmm, if I were you, apart from the unnesessary brackets, I would probably
do what you have done,
I would make sure I was using the Send as HTML as below.
$mail->IsHTML(true); as you might not have done.
Then, if that didn't work, I might ask someone on here, as you have done.
And then I might find you answering me as I have done.
But then again, I'm not you :)
Vince
Vince Morgan [ Sa, 28 April 2007 17:50 ] [ ID #1700245 ]

Re: Using phpMailer & HTML

"Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
And, if I had refreshed the post first I would not have replayed, as
simmyshack has already done.
Vince Morgan [ Sa, 28 April 2007 17:54 ] [ ID #1700246 ]

Re: Using phpMailer & HTML

On Apr 28, 4:54 pm, "Vince Morgan" <vin... [at] REMOVEoptusnet.com.au>
wrote:
> "Vince Morgan" <vin... [at] REMOVEoptusnet.com.au> wrote in message
>
> news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
> And, if I had refreshed the post first I would not have replayed, as
> simmyshack has already done.

ah but i didnt mention the brackets Vince!, well spotted!

btw john, phpmailer has great documentation, as well as example code
which shows all this!
shimmyshack [ Sa, 28 April 2007 18:16 ] [ ID #1700248 ]

Re: Using phpMailer & HTML

Vince Morgan wrote:
> "Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
> news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
> And, if I had refreshed the post first I would not have replayed, as
> simmyshack has already done.
>

Answering posts is 'play' to you, is it? :P

"Whooo, I'm a level 9 post-answerer, beware of the end-guy of level 8,
he seems hard, but turns out to be just a troll.."

"Level 4 is easy, just hurl 'comp.lang.javascript' to them untill they
understand..."

:-)
--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
luiheidsgoeroe [ So, 29 April 2007 02:13 ] [ ID #1700671 ]

Re: Using phpMailer & HTML

"shimmyshack" <matt.farey [at] gmail.com> wrote in message
news:1177776966.812089.280560 [at] o5g2000hsb.googlegroups.com...
> On Apr 28, 4:54 pm, "Vince Morgan" <vin... [at] REMOVEoptusnet.com.au>
> wrote:
> > "Vince Morgan" <vin... [at] REMOVEoptusnet.com.au> wrote in message
> >
> > news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
> > And, if I had refreshed the post first I would not have replayed, as
> > simmyshack has already done.
>
> ah but i didnt mention the brackets Vince!, well spotted!
>
> btw john, phpmailer has great documentation, as well as example code
> which shows all this!
>
You didn't mention them because they were largely irrelevent :)
Vince Morgan [ So, 29 April 2007 02:20 ] [ ID #1700672 ]

Re: Using phpMailer & HTML

"Rik" <luiheidsgoeroe [at] hotmail.com> wrote in message
news:f10nbl$2g8$1 [at] news1.zwoll1.ov.home.nl...
> Vince Morgan wrote:
> > "Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
> > news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
> > And, if I had refreshed the post first I would not have replayed, as
> > simmyshack has already done.
> >
>
> Answering posts is 'play' to you, is it? :P

Normaly I stick to the alt.kitchen.cooking group but the activity has been
low recently.
Hope you find your legs soon Rik. Errr, I mean, I'm sure they're still
there, but,, hmm, get well soon!
;]
Vince
Vince Morgan [ So, 29 April 2007 02:28 ] [ ID #1700673 ]

Re: Using phpMailer & HTML

Vince Morgan wrote:
> "Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
> news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
> And, if I had refreshed the post first I would not have replayed, as
> simmyshack has already done.
>

Answering posts is 'play' to you, is it? :P

"Whooo, I'm a level 9 post-answerer, beware of the end-guy of level 8,
he seems hard, but turns out to be just a troll.."

"Level 4 is easy, just hurl 'comp.lang.javascript' to them untill they
understand..."

:-)
--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
luiheidsgoeroe [ So, 29 April 2007 02:13 ] [ ID #1700679 ]

Re: Using phpMailer & HTML

"shimmyshack" <matt.farey [at] gmail.com> wrote in message
news:1177776966.812089.280560 [at] o5g2000hsb.googlegroups.com...
> On Apr 28, 4:54 pm, "Vince Morgan" <vin... [at] REMOVEoptusnet.com.au>
> wrote:
> > "Vince Morgan" <vin... [at] REMOVEoptusnet.com.au> wrote in message
> >
> > news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
> > And, if I had refreshed the post first I would not have replayed, as
> > simmyshack has already done.
>
> ah but i didnt mention the brackets Vince!, well spotted!
>
> btw john, phpmailer has great documentation, as well as example code
> which shows all this!
>
You didn't mention them because they were largely irrelevent :)
Vince Morgan [ So, 29 April 2007 02:20 ] [ ID #1700681 ]

Re: Using phpMailer & HTML

"Rik" <luiheidsgoeroe [at] hotmail.com> wrote in message
news:f10nbl$2g8$1 [at] news1.zwoll1.ov.home.nl...
> Vince Morgan wrote:
> > "Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
> > news:46336d08$0$16556$afc38c87 [at] news.optusnet.com.au...
> > And, if I had refreshed the post first I would not have replayed, as
> > simmyshack has already done.
> >
>
> Answering posts is 'play' to you, is it? :P

Normaly I stick to the alt.kitchen.cooking group but the activity has been
low recently.
Hope you find your legs soon Rik. Errr, I mean, I'm sure they're still
there, but,, hmm, get well soon!
;]
Vince
Vince Morgan [ So, 29 April 2007 02:28 ] [ ID #1700682 ]
PHP » alt.php » Using phpMailer & HTML

Vorheriges Thema: PHP-Nuke Themes -Request Post Please-
Nächstes Thema: phpMyAdmin problem