I have been spending some time with this problem as of late trying to
figure out the solution but I haven't gotten anywhere, so I thought I
would ask on here.
I am trying to put newlines into the data I am sending via the email
component.
My code is as follows:
$data = '';
if
(!empty($this->data['Contact']['business']))
{
$data .= 'Business: ' .
$this->data['Contact']['business'] . '\n
\n';
}
if
(!empty($this->data['Contact']['business_type']))
{
$data .= 'Business Type: ' .
$this->data['Contact']
['business_type'] . '\n\n';
}
if
(!empty($this->data['Contact']['location']))
{
$data .= 'Location: ' .
$this->data['Contact']['location'] . '\n
\n';
}
$data .= 'Regarding: ' .
$this->data['Contact']['regarding'] . '\n
\n';
$data .= 'Comments: ' .
$this->data['Contact']['comments'];
As you can see, I am currently trying '\n\n' for new lines, I have
also tried '\n' and '\r\n', but nothing has worked. I noticed that the
Email component seems to have a variable $_newLine available to it,
but I am unsure as to how to use it and if it would even fix this
problem.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---