I am using one of WebFusion's VPS servers and trying to get a home grown mail script working - it includes some traps and a Captcha script and works quite well on several other servers. BUT, in trying to migrate my sites to the single VPS, I am having trouble with the final line of the script - actually sending the mail.
This is the relevant part of the code:
- Code: Select all
$subject = "Subject";
$message = "Remote IP: $ipadd, Referring Page: $refer\n Browser: $pagenti,\n\nSource: $tag\n\nName: $realname\nEmail: $email\n\nComments:\n$comments";
$headers = "From: $email\n";
//$sendto = "me@my".CHR(45)."address.co.uk";
//$sendto = "me@my\-address.co.uk";
//$sendto = "me@my-address.co.uk";
$sendto = "me@myaddress.co.uk";
mail($sendto, $subject, $message, $headers );
echo $sendto, $subject, $message, $headers;
The various '$sendto' are those I have tried (the CHR and the escaped hyphen from desparation
The echo is in there for me to check that the message is formed correctly (and it is). I have spent the last 3 days looking/searching for a solution and now seek advice/suggestions from here to get this running.
I like my script - I can change it quickly to cope with the various attacks that take place to SPAM/relay emails, and would like to continue using it as I understand it. But, if someone has a suggestion of a different script, then please let me know.
At the end of the day I don't like being beaten and would like to understand where the problem is - it could crop up again.
FWIW the SMTP is qmail running under Plesk 8.4.0 on Ubuntu 6.06
TIA
