Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-06-27
6
Medium Priority
?
1,121 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 40

Expert Comment

by:Richard Quadling
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:
Richard Quadling earned 2000 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:Richard Quadling
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

610 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