Ticket message makes \r\n in line space
I have now searched all over for fixing my issue but no solution. My dev gaveup long ago, so help anyone..
I have a integrated ticket system sending automatic email to user and admin when create and reply. The email header goes fine out and email ticket template also fine. But the Message included keep have this issue with line space replaced by \r\n.
It run on Linux server
Here is email header
$config['email_headers'] = "MIME-Version: 1.0\r\nContent-type: text/plain; charset=iso-8859-1\r\nFrom: \"sitename\" <noReply@mydomain.com>\r\nReply-To: \"NoReply\" <email@example.com>\r\nX-Priority: 3\r\nX-Mailer: PHP 5.4";
Here is the function file part
# Email to user and admin code starts here
$sql = "select * from ".TABLE_PREFIX."emailtemplate where type='ticketreply_send' LIMIT 1";
$sth = mysql_query( $sql );
$emailtemplate = mysql_fetch_array( $sth );
$Ticket_Email = $emailtemplate['content'];
$Ticket_Email = str_replace( "[[SITE_TITLE]]", $this->config['title'], $Ticket_Email );
$Ticket_Email = str_replace( "[[ticket_id]]", $ticketId, $Ticket_Email );
$Ticket_Email = str_replace( "[[message]]", $message, $Ticket_Email );
$Ticket_Email = explode( "--- Email ---", $Ticket_Email );
$Subject = $Ticket_Email;
$Message = $Ticket_Email;
mail( $user_info['email'], $Subject, $Message, $this->config['email_headers'] );
mail( $this->config['private_sys_email'], $Subject, $Message, $this->config['email_headers'] );
# Email to user and admin code ends here
If you need more parts of code pls let me now.
I realy hope some of you will give it a bit time and have the answer. Thank you alot.
email body comes like this:
Ticket g43d33Tp reply has been created.
Message: testing\r\nlinebrake\r\n1\r\n2\r\n3\r\n4\r\ndouble line\r\n\r\nhere\r\n
To reply on this ticket, please login to your mydomain account
Can we see some of the code that creates the message body that is giving you the problem? I'm guessing that you didn't use dbl quotes on that part.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread