-1

I am able to send an email with variables in the email message but I am not able to add line breaks to the message. I have tried everything that I have been able to find online. I am using a form to generate an email that creates a help desk ticket. I don't think the help desk will except HTML email.

        $rname=$_POST["rname"];
        $fname=$_POST["fname"];
        $lname=$_POST["lname"];
        $supervisor=$_POST["supervisor"];
        $phone=$_POST["phone"];
        $pforward=$_POST["pforward"];
        $email=$_POST["email"];
        $eforward=$_POST["eforward"];
        $eddate=$_POST["eddate"];
        $trdate=$_POST["trdate"];
        $description=$_POST["description"];

        $this->email->to('test@test.gov');

        $this->email->subject('An Employee Access Termination Request has been Submitted');

        $this->email->message(' Requestor Name: ' .$rname. ' Employee First Name: ' .$fname. ' Employee Last Name: ' .$lname.' Supervisor Name: '.$supervisor.' Phone: '.$phone. ' Phone Forward: '.$pforward. ' 
            Email: '.$email. ' Email Forward: '.$eforward. ' Employee Disconncet Date: ' .$eddate. ' Technology Return Date: ' .$trdate. ' 
            Special Instructions: ' .$description .= "Please remove access from any other systems such as KLAS Evergreen LIMS and or the Drupal WebSites");
  • Is the email being sent as plain text or HTML? – Mike Jun 03 '16 at 17:58
  • It seems that you are sending this email as plain text. In that case,
    won't work. Newlines will thought.
    – NaeiKinDus Jun 03 '16 at 17:58
  • @NaeiKinDus How can you tell it's plain text? And there are no `
    ` tags anywhere...
    – Mike Jun 03 '16 at 17:59
  • 1
    @Mike "I don't think the help desk will except HTML email.". That's just a wild guess... but if I correctly recall how boundaries work with emails, the default is plaintext and you have to add metadata to say the mailer that it should use HTML rendering. About the
    , again, a wild guess... OP didn't really provide us with details :)
    – NaeiKinDus Jun 03 '16 at 18:00
  • @NaeiKinDus Regardless of the HTML rendering capabilities of the email client, the question was whether the email is being **sent** as plain text or HTML. – Mike Jun 03 '16 at 18:04

1 Answers1

0

This works for me in my PHP forms:

"\n"

This doesn't work for me

"<br>" or "<br />"
J. DKYSR
  • 80
  • 1
  • 14