# Format the e-mail contents sent by mailer.php

**URL:** <https://forum.kirupa.com/t/format-the-e-mail-contents-sent-by-mailer-php/271922>\
**Category:** programming\
**Created:** [September 30, 2008, 1:09pm UTC](https://forum.kirupa.com/t/format-the-e-mail-contents-sent-by-mailer-php/271922 "2008-09-30T13:09:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian\_dcuk](https://avatars.discourse-cdn.com/v4/letter/i/ea666f/32.png) [@ian\_dcuk](https://forum.kirupa.com/u/ian_dcuk)\
**Post date:** [September 30, 2008, 1:09pm UTC](https://forum.kirupa.com/t/format-the-e-mail-contents-sent-by-mailer-php/271922/1 "2008-09-30T13:09:39Z")

</div>

Im thinking theres an easy answer to this however i cant seem to over come the problem.

All im now trying to do is to have the information sent to me presented neatly in the e-mail. For example to have the ‘$message’ vairables presented on a new line.

I know all the html coding well, but dont know how to implement it into the php.

Here is the php mailer code below:

\<?php  
$product = $\_POST[‘product’];  
$flavour = $\_POST[‘flavour’];  
$container = $\_POST[‘container’];  
$size = $\_POST[‘size’];  
$labeltype = $\_POST[‘labeltype’];  
$logoname = $\_POST[‘logoname’];  
$contactnumber = $\_POST[‘contactnumber’];  
$contactemail = $\_POST[‘contactemail’];  
$owncomment = $\_POST[‘owncomment’];

$message = ‘Product Type: ‘. $product .’, Flavour:’. $flavour .’, Container Type:’. $container .’, Size:’. $size .’, Label type:’. $labeltype .’, Logo Name:’. $logoname .’, Contact Number:’. $contactnumber .’, Contact E-Mail:’. $contactemail .’, Comments:’. $owncomment .’ ';

//To, Subject, Message, Header  
mail('email@email.co.uk ', ’ ’ . $logoname . ’ ', $message, ‘From: ’ . $contactemail . ’ \<’ . $contactemail . ‘\>’);  
//header(‘Location: index.html’);

?\>

Much appreciated  
Ian :nerd:
