My email scripts don't work!

opster

New Member
Messages
16
Reaction score
0
Points
0
Hi,

Code:
<?php
$to = "info@opster.co.uk";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "sales@opster.co.uk";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

Works on stoli, but not on my fiends boru account (who i'm building the site for)

Any ideas?
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
If you are using your email address as the From header on someone else's account, it won't work since mails are killed if the From header is spoofed. If you are changing the From to an existing account on the domain your script is running on, and the code that works on one server isn't working on another, then it's a support issue, not a coding issue.
 
Top