Comments

  1. Tyler says:

    I followed this tutorial for my RC5 and my output e-mail looks like this

    Person,A request for support has been created and assigned ticket #757947. A representative will follow-up with you as soon as possible.You can view this ticket’s progress online here: http:/websiteaddress.com/support/view.php?e=emailaddress@email.com&t=757947.If you wish to send additional comments or information regarding this issue, please don’t open a new ticket. Simply login using the link above and update the ticket.websiteaddress.com.com admnimistrator

    I changed the personal info above, but it strips everything down to one line and is not bold.

    here are my changes

    /support/include/msgtpl.php

                     ',ticket_reply_subj='.db_input(Format::striptags($var['ticket_reply_subj'])).
    		 ',ticket_reply_body='.db_input($var['ticket_reply_body']).
     		 ',forgot_ticket_subj='.db_input(Format::striptags($var['forgot_ticket_subj'])).

    /support/include/class.email.php

    There are 2 entries of step 2 part 1. I replaced both instances. 1 instance is in the “send” function and another in “sendmail” function. In my settings i have SMTP as outgoing.

    instance 1

    //$body = stripslashes(preg_replace("/(\r\n|\r)/s", "\n", trim($message)));
    $body = stripslashes(preg_replace("/(\r\n|\r)/s", "", trim($message))); // HTML mode
    $fromname=$this->getName();

    instance 2

    $subject=stripslashes(preg_replace("/(\r\n|\r|\n)/s",'', trim($subject)));
    //$body = stripslashes(preg_replace("/(\r\n|\r)/s", "\n", trim($message)));
    $body = stripslashes(preg_replace("/(\r\n|\r)/s", "", trim($message))); // HTML mode
    $headers = array ('From' =>$from,

    step 2 part 2

    if($attachment && $attachment['file'] && is_readable($attachment['file'])) { //file of.
    //$mime->setTXTBody($body);  // switch to HTML mode below
    $mime->setHTMLBody($body);
    $mime->addAttachment($attachment['file'],$attachment['type'],$attachment['name']);

    E-mail template is

    <b>%response</b>
    <a href="%url/view.php?e=%email&t=%ticket" rel="nofollow">%url/view.php?e=%email&t=%ticket</a>

    Thanks for the up and coming support, and these tutorials are gold.

  2. Tyler says:

    looks like I cant paste in the e-mail template without this site changing it, but basically I followed your steps for it

  3. Tyler,

    I think you have missed the step that you called with instance 2 above.
    Yours is:

    $body = stripslashes(preg_replace("/(\r\n|\r)/s", "", trim($message))); // HTML mode

    whereas it should be:

    $body = stripslashes(preg_replace("/(\r\n|\r)/s", "<br />", trim($message))); // HTML mode

    In the other words, you missed the <br /> tag which has function to break the line to the next line.

  4. Tyler says:

    Masino, the instance 2 suggestion you had was already implemented in my code, I guess it was just a bad typo on my part on the post. The Results are still the same as my original post. Im just going to revert back and wait for others feedback because I know im doing it right.

  5. Tyler,

    I have re-tested that modification above and there is nothing left. Also, the response email that received by client also worked properly; the response message text was bold as well.

  6. Ege Gorgun says:

    Hi Tyler,

    You should also edit “ticket_autoresp_subj” and “ticket_autoresp_body” lines as below to be able to put HTML codes in the new ticket alert template which is sent to the clients:

     ',ticket_autoresp_subj='.db_input($var['ticket_autoresp_subj']).
     ',ticket_autoresp_body='.db_input($var['ticket_autoresp_body']).
    
    And Masino, you should change the above line
    
                     ',ticket_reply_subj='.db_input($info['ticket_reply_subj']).
    to this:
    
                     ',ticket_reply_subj='.db_input($var['ticket_reply_subj']).
  7. Bernhard says:

    Hi,

    Implemented everything in OSticket 1.6 Stable. Works fine.

    However the line break (ENTER) done by the staff does not go into the resulting email.

    Any suggestions?

  8. Alex says:

    Can someone please update the main codes and let us know the final version?

    Thanks

Speak Your Mind

*


*