Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

php line spacing

Posted on 2013-12-03
4
Medium Priority
?
521 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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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 84

Expert Comment

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

715 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