|
Posted by Steve on 11/02/05 13:26
> I have been paying a developer to complete what I thought would be
> a relatively simple task.
To be honest I think you should resolve this with your "developer".
However, that aside... from what I can see the script can connect to a
mailbox and fetch a message body. From there onwards there seem to be
some confused assumptions. Having got a body, the script tries to
extract $plainText by fetching text between two token strings.
> function getPlainText($body){
> $a = strrev(strstr($body,"Dear ABETTERWORLD.CO.UK LTD,"));
> $b = strrev(strstr($a,"2521-swodniw=tesrahc ;lmth/txet :epyT-tnetnoC"));
> return $b;
> }
One of those tokens is the content type header "Content-type:
text/html; charset=windows-1252" - but this token will not be found in
body text fetched by the function call used:
imap_fetchbody($stream,$value->uid,1,FT_UID);
This says get the body text, specifically *excluding* headers.
So the call to getPlainText() returns an empty string, and all fails
after that.
My guess is that your "developer" has a different PHP version or IMAP
module version on his "development" server to that on your production
server. This script could be fixed by a competent developer.
---
Steve
Navigation:
[Reply to this message]
|