Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Troubleshooting and Problems

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-24-2012, 03:03 AM
Juscommune Juscommune is offline
Junior Member
 
Join Date: Jun 2012
Posts: 1
Default Email - broken links, substitute characters?

I am setting up a Word Press site and have installed a plug-in which uses osTickets (I'm assuming it is the latest version)

When running a test the recipient receives an email which has broken links and some characters like the @ symbol being replaced with: %40

Carriage returns have an equals symbol etc.

Does anyone know what needs to be done to correct this? - sample of email below:

//
John Smith, A request for support has been created and assigned ticket #993129. A repre= sentative will follow-up with you as soon as possible. You can view this ticket's progress online here: http://signmaker.ws/suppor= t/help-desk/?zpage=view&e=grafixware%40hotmail.com&t=993129. 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 upd= ate the ticket. Thank you Support Dept. SignMaker Software Series
//

Thank you,
Reply With Quote
  #2  
Old 09-24-2012, 05:02 PM
lakesidechurch lakesidechurch is offline
Junior Member
 
Join Date: Sep 2012
Posts: 1
Default Formating issues in emails

I have a similar problem that every line is ending with an =
which breaks the link to the ticket.
I don't have the @s being substituted but I did notice that this only happens when using the PHPmail instead of SMTP.

We use a bulk SMTP service and the login is different then the default IMAP account so I can't use the SMTP service.
Reply With Quote
  #3  
Old 10-09-2012, 12:26 PM
kojitron kojitron is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Default Users can't reply

A similar problem I have is that to our clients who use Microsoft Exchange mail services, sender of the email to them (i.e. us) has an address that is stripped from @ onwards.

So when we reply on the ticket and a notification is sent from
support@our_mail.com

They get an email from

support@ [our_mail.com support@our_mail.com]

Therefore when they hit reply, they have the wrong email address and fails to send. They have to manually type in the correct emails. This seems only to occur for Microsoft Exchange.

Anything I can do about this?
Reply With Quote
  #4  
Old 10-09-2012, 02:22 PM
ntozier's Avatar
ntozier ntozier is offline
Moderator
 
Join Date: Jan 2010
Location: NH USA
Posts: 1,628
Default

kojitron,

We've been using Exchange for years (through several different versions, currently 2007) and have never seen what you are describing. What version of Exchange are you running that you see this?

I find it far more likely that the original email being sent to them is being sent with it wrong in the first place. [not that there are numerous points of possible failure, and that's my guess] Can you check the mail log on your server and or turn on debugging in php and see what shows up?
__________________
ntozier
OST Forum Mod - tmib.net - System Admin
Reply With Quote
  #5  
Old 10-10-2012, 08:27 AM
kojitron kojitron is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Default

Thanks ntozier,

I haven't really seen anything wrong in my mail logs.
I'm not sure about the debugging php part... (I'm a bit of a newb)

About the version, the one I tested was on Microsoft Live@Edu that has
Mailbox server Microsoft Exchange version: 14.15.108.0

It was tested on other mail clients as well but I'm not sure which version.
Reply With Quote
  #6  
Old 10-10-2012, 11:23 AM
kojitron kojitron is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Default

Didn't work with Microsoft Exchange Server 2007 too, apparently.
Reply With Quote
  #7  
Old 10-12-2012, 10:47 AM
kojitron kojitron is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Default

The attached is a screencap of what I see.
As you can see, the string after the @ character is split away and gives an invalid email address.

Only seems to happens with Microsoft Exchange.
Attached Images
File Type: jpg osticket_mail_fault.jpg (79.6 KB, 2 views)
Reply With Quote
  #8  
Old 10-22-2012, 10:21 AM
kojitron kojitron is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Default Resolved!

Hi,

I've just worked out where to look for the php.

I did do a quick fix and it seems to be working.
As you can see I commented out in the headers section the "From:" and the "Reply-To:" definition, replacing them with just the address without the sender name (it was support@our_mail.com anyway).

I'm still not sure why it was doing it wrong for MS Exchange.
Could it be the trim at the very bottom?

PHP Code:
  /* Send email out after minor cleanups..*/
    
function sendmail($to$subject$message$fromaddress,$fromname=''$xheaders '') {
        
//TODO: provide an option to use SMTP server. Log all outgoing emails??

        
$eol="\n";
        
$fromname=$fromname?$fromname:$fromaddress;
        
//$fromname=$fromaddress;
        //do some cleanup...avoid stupid errors.
        
$to=preg_replace("/(\r\n|\r|\n)/s",''trim($to));
        
$subject=preg_replace("/(\r\n|\r|\n)/s",''trim($subject));
        
$message preg_replace("/(\r\n|\r)/s""\n"trim($message));

        
#Headers
        //$headers .= "From: ".$fromname."<".$fromaddress.">".$eol;
        
$headers .= "From: ".$fromaddress.$eol;
        
//$headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol;
        
$headers .= "Reply-To: ".$fromaddress.$eol;
        
$headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;
        
$headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
        
$headers .= "X-Mailer: osTicket v 1.6".$eol;
        if(
$xheaders) { //possibly attachments...does mess with content type
            
$headers .= $xheaders;
        }else{
            
$headers .= "Content-Type: text/plain; charset=utf-8".$eol;
            
$headers .= "Content-Transfer-Encoding: 8bit".$eol;
        }

        
//echo "[$to,$subject,$message ".$headers.']';
        
mail($to,$subject,$message,trim($headers));
    } 
Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:24 PM.