473,671 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 <brand bold headers <b></
bwhere 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>A rea:</b>
$area,<br><b>Is sue:</b$issue");

Thanks,
John

Apr 28 '07 #1
7 2081
On Apr 28, 3:52 pm, j...@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 <brand bold headers <b></
bwhere 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>A rea:</b>
$area,<br><b>Is sue:</b$issue");

Thanks,
John

$mail->IsHTML(true) ;

Apr 28 '07 #2
<jc***@lycos.co mwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
I'm using the following line of php code and would like to incorporate
a little HTML in order to get line breaks <brand bold headers <b></
bwhere 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>A rea:</b>
$area,<br><b>Is sue:</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
Apr 28 '07 #3
"Vince Morgan" <vi****@REMOVEo ptusnet.com.auw rote in message
news:46******** *************** @news.optusnet. com.au...
And, if I had refreshed the post first I would not have replayed, as
simmyshack has already done.
Apr 28 '07 #4
On Apr 28, 4:54 pm, "Vince Morgan" <vin...@REMOVEo ptusnet.com.au>
wrote:
"Vince Morgan" <vin...@REMOVEo ptusnet.com.auw rote in message

news:46******** *************** @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!

Apr 28 '07 #5
Rik
Vince Morgan wrote:
"Vince Morgan" <vi****@REMOVEo ptusnet.com.auw rote in message
news:46******** *************** @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.java script' to them untill they
understand..."

:-)
--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Apr 29 '07 #6

"shimmyshac k" <ma********@gma il.comwrote in message
news:11******** **************@ o5g2000hsb.goog legroups.com...
On Apr 28, 4:54 pm, "Vince Morgan" <vin...@REMOVEo ptusnet.com.au>
wrote:
"Vince Morgan" <vin...@REMOVEo ptusnet.com.auw rote in message

news:46******** *************** @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 :)
Apr 29 '07 #7
"Rik" <lu************ @hotmail.comwro te in message
news:f1******** **@news1.zwoll1 .ov.home.nl...
Vince Morgan wrote:
"Vince Morgan" <vi****@REMOVEo ptusnet.com.auw rote in message
news:46******** *************** @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.coo king 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
Apr 29 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
15520
by: James | last post by:
How can I take my form data and send it as an email using my SMTP server located @ my ISP using PHP ? my form has several fields: TO: this is a drop down list FROM: this is a drop down list SUBJECT: Free Type
1
2439
by: Daniel Loose | last post by:
Hi, a friend was so kind to host my php scripts. but when they use phpmailer (or other PHP mail facilities) to email e.g. to an invalid address, the returning error message appears in *my friend's email inbox* (recipient - or sender? - is "wwwrun" of my friend's machine). I guess you understand which problem I mean. To fix the problem, I would like to understand what is going on here - in the mail header, i did set replyto, x-sender...
4
1923
by: R. Rajesh Jeba Anbiah | last post by:
If you're working in PHP 5 and used APD, phpDocumentor, PHPMailer & ADODB, you might be knowing that these projects are not maintained and the old codes are throwing bunch of errors in higher error levels. Anyone knows of any forks for these projects or any alternatives? TIA -- <?php echo 'Just another PHP saint'; ?> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
1
12576
by: Leszek | last post by:
Hi. I have problem with phpMailer 1.73 (windows version) After copying both class.phpmailer and class.smtp and also language file phpmailer.lang-pl to my php include directory im getting this error when I'm trying to use phpMailer: Mailer Error: Language string failed to load: recipients_failed Does anyone konw the reason for this error?
7
7732
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee free edition for anti-virus. I use an ISP provider from my country and according to them I do not need to perform authentication while sending mails through their SMTP address. Thus I am using external SMTP server. I don't have IIS installed...
2
4553
by: prasenjit2007 | last post by:
Hello, can u help me sending Email with attachments using the Class phpMailer. On the website I have a link to an html form in which I input the parameters with the names 1)from(textbox name) 2)To 3) Subject 4) Message5) File input(name abc) - to be sent as an attachment. This form calls the Class PhpMailer through another form with the following code to send the mail. <?php ini_set("include_path",...
2
1704
by: pradeep | last post by:
Hello All, I use PHPMailer with my SMTP server mail.demo.com I changed my mail server to mail.demo.com to mail.anotherdemo.com So, i replaced mail.demo.com by mail.anotherdemo.com similarly with his port no. also, However, my application does not sent email.
7
22834
dlite922
by: dlite922 | last post by:
I can't seem to get it working with my smtp server. I can send the email through the command line like so: 220 localhost.localdomain ESMTP Sendmail 8.13.8/8.13.8; Wed, 6 Aug 2008 18:44:29 -0600 EHLO www.dmconsultingonline.com 250-localhost.localdomain Hello mail.dmconsultingonline.com , pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME
2
5886
mikek12004
by: mikek12004 | last post by:
Before posting here I google it and saw ablut 30 pages for a solution so I pretty much excluded the obvious things. The code is <?php //now to send the mails to seller require("class.phpmailer.php"); $mail = new PHPMailer(); //$mail->IsSMTP(); // telling the class to use SMTP //$mail->Host = "smtp.example.com"; // SMTP server $from = "vasilis@emile.com"; $mail->From = $from;
0
8402
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8927
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8605
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8676
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7445
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6237
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5703
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.