Solved

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

Posted on 2006-06-27
6
1,097 Views
Last Modified: 2013-12-13
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
Comment
Question by:guess18
  • 3
6 Comments
 
LVL 40

Expert Comment

by:RQuadling
ID: 16999055
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
 

Author Comment

by:guess18
ID: 17003332
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
 
LVL 40

Accepted Solution

by:
RQuadling earned 500 total points
ID: 17007772
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
 
LVL 40

Expert Comment

by:RQuadling
ID: 17007807
     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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now