Solved

php line spacing

Posted on 2013-12-03
4
510 Views
Last Modified: 2013-12-03
See attached php scripts. The one with _prev is the previous one.

I have had a lot of issues with php mail function on this web server so I decided (at the recommendation of several EE Experts) to use a different class, class.phpmailer.php. I also attached it. I have successfully used it in another portion of this application.

In the script updt_test.php, it works fine & generates the email correctly; it just does NOT put line spacing after each line in the email body. Not that the previous version used "\n" at the end of line. I tried adding "\r\n" as in updt_test.php, still no line break.

The following is the sent email:

A new instant customer has been added to the on-line database as follows: Full Name: RK Associates Contact Name: Richard Korts Billing Address 1: 866 Chardonney Way Billing Address 2: Billing Address 3: Billing Address 4: City: Escondido State: CA Zip: 92029 Phone: 760-746-3263 FAX: 92029 Alt. Phone: 760-489-1780 Alt. Contact: E-Mail: richardkorts@gmail.com Major Intersecting: Source: Timer & Location:

I know I solved this problem YEARS ago but for some reason, it no longer works.

How can I make it work?
updt-test.php
updt-test-prev.php
class.phpmailer.php
0
Comment
Question by:Richard Korts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39693309
"\r\n" works in plain text email.  <br> must be used in HTML email.
0
 
LVL 18

Expert Comment

by:Steven Harris
ID: 39693323
Try using:  echo "\r\n"
0
 

Author Closing Comment

by:Richard Korts
ID: 39693402
Yes, of course I knew that, I did not realize that the class defaulted to HTML (which is a GOOD thing).

That fixed it up perfectly.

Thanks
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39693480
You're welcome.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question