Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Problem inserting new line into plain text email content
  • Hi there,
    I feel a little stupid asking this as I'm sure it's an easy solution, but I can't work out how to insert a new line into my plain-text email content. I've got a $plain_text_content variable which holds a string of content like so: $plain_text_content = "This is my alternative plain text content. \r\n";
    $plain_text_content .= "This is the second line."; I then send the email like so: $email = Email::forge();
    $email->html_body($html_content, false, false);
    $email->alt_body($plain_text_content);
    // More code for email sending // I receive the email fine, and while the code looks right to me, the plain-text version doesn't seem to insert a line break. The two lines just run together. I'm just wondering if I am missing something obvious here? PS - My fuel/app/config/email config file has ''newline" => "\r\n" in the configuration array.
  • I can't see anything obviously wrong with this code. If nobody else can help you, Frank (the author of the package) is back online next week...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion