Hi,
I have the message body of an email with the variable below:
$message = $customername." ".$customeraddress."<br/>".$telnumber."<br/>".$faxnumber."<br/>".$email."<br/>".$emailinv."<br/>".$autsig."<br/>".$position."<br/>".$date."</body>"."</html>";
I want to format the output so that each variable is printed on the next line but in my email I can see the markup outputted.
Sorry this is an incredibly simple thing to ask. It is my first post though so be gentle!
Andy
format string in email
Moderator: General Moderators
- iankent
- Forum Contributor
- Posts: 333
- Joined: Mon Nov 16, 2009 4:23 pm
- Location: Wales, United Kingdom
Re: format string in email
If you're sending the email in plain text (which you are if you see <br /> instead of a newline), then simply replace all of the <br />'s with \n's, i.e.
hth
Code: Select all
$message = $customername." ".$customeraddress."\n".$telnumber."\n".$faxnumber."\n".$email."\n".$emailinv."\n".$autsig."\n".$position."\n".$date;