Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1129
  • Last Modified:

Emails to OSticket getting cut off when there is a ' or "

Hi there,

I have OSticket running and I believe it uses the php mail function.  When I receive email form 1 client (Mac, entourage) it cuts the message off at the first " or '  in the message.  If i copy the original and send from Outlook there is no problems.  Is this an encoding issue or something that can be corrected on my end or do I have to get the client to change something.

Mike
0
guess18
Asked:
guess18
  • 3
1 Solution
 
Richard QuadlingSenior Software DeverloperCommented:
I don't run OSTicket, and as such have some questions.

I tried to download OSTicket, but V1 is discontinued and V2 is coming. http://www.osticket.com/downloads.php

The system must somehow get the email from the mail server.

You need to examine this script to see if you can get the mail as soon as it arrives into the script and before any processing. At that stage see if the entire email is present.

If it is, then the problem is withing OSTicket.

If not then the problem lies between the client and the mail server OR the mail server and the method PHP uses to read the mail.

But without any source, this is a bit difficult to deal with.
0
 
guess18Author Commented:
Thanks for the response.  Currently I am running a windows scheduled task to fetch the email from this post http://www.osticket.com/forums/showthread.php?t=349&highlight=pop3+fetch 

You can download version 1.3.1 from this post http://www.osticket.com/forums/showthread.php?t=1362&highlight=download+1.3.1

I believe its the script that is causing the errors because I setup that POP account to forward a copy to my email address incase something like this happens.  The copy I receive is fine in Outlook 2003.  For some reason its just from this one client that is sending mail from Entourage in Mac.

Thanks,

Mike
0
 
Richard QuadlingSenior Software DeverloperCommented:
Without some data to test and to see what is going on, I'm a bit stuck.

I assume that automail.php is the script responsible.

I would say that the get_part() function is the problems.

What we need to determine is ...

1 - Is this the right place to look.
2 - Assuming it is, does $curmsg contain the ENTIRE message.

The issue is that we need to know which message to examine as you may be getting a LOT of messages.

I think you will need the help of your Mac user to diagnose this.

The first thing I would do is to probably dump the value of $curmsg to a file.

If you have VERY few (1 or 2 an hour), then we can use the same file and you have to manually watch for them.

If you get more than that, then you would need to use 1 file per message and manually delete them.

If you know of a way to identify the sender then we can use that as a filter.

The function imap_body() will get the message in its entirity. Ignoring MIME types.

That would be a start. Make sure your server is actually getting the entire message.

Basically it is a debugging exercise.

It is a case of seeing what gets extracted from the message and reporting that and manually dianosing it.

Ah.

As this is running on a  schedule, you COULD stop that and run it manually from the CLI or a browser?

So, we should be able to add as much debugging as we want.



So ...
Stop the scheduler and see if you can launch the automail.php script from your browser.

If so, lets start debugging.

All debugs are ...

echo '<br />' . __FILE__ . ':' . __LINE__ . ':' . xxxx;

where xxxx is the variable or message we want to show. That way we have a history of each line.

0
 
Richard QuadlingSenior Software DeverloperCommented:
     while ($curmsg <= @imap_num_msg($mbox)) {
            echo '<br />' . __FILE__ . ':' . __LINE__ . ": <b>Message #$curmsg</b> : " . imap_body($mbox, $curmsg) . '<hr /><br /><br />';
            $body = get_part($mbox, $curmsg, "TEXT/PLAIN");


Try this one first. See if the entire message is visible.

If you are running this manually you should see the message on the screen.

0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now