Thanks for the response.
one or both of Accept email, and Relay email would seem to be wrong... My inclination would be to not accept email (since you aren't the MX host) but to allow relay (because internal mail is effectively relayed once to get out) but the raq4 may be different..
I've taken the domain name out of the "Domain Names" box in the Control Panel Email settings to stop the accepting email function. It is listed in the Relaying field however.
Now the script is fine but I get the dreaded "mail loops back to me" error and all the mail piles up in the main server admin box.
Any ideas? Brian