Thanks.
Just to illustrate my whole setup so you can see all. I have a Procmail recipe that diverts all incoming mail for this user to a mailbox - 'INBOX-processing'.
This script connects to the mailbox and checks each message as I mention in my first post. The exact code for the section I have problems with is:
// get the subject
if ($header->Subject == "") {
$subject = "No subject";
} else {
$subject = $header->Subject;
}
// add the company name and deliver to INBOX
$add_company = "Co: $company";
$add_company .= $subject;
$subject = $add_company;
$header->Subject = $add_company;
$message_move = imap_mail_move($inbox,$msg_no,"INBOX");
INBOX-processing is chmod 777, since that is where the email is when the write process needs to take place I think that is the only file that needs 777. (I have also made the whole directory 777 as you suggest)
The script runs with no warnings or errors reported. The email is moved to the INBOX as expected and can be collected by the user with Outlook Express. The only problem is that the subject remains unchanged. 🙁
I guess I am doing something wrong here. In my experience its going to be a very simple thing too which is why I am missing it....
BTW thanks for taking an interest!
Patrick