PDA

View Full Version : Send Mail


TUF
06-04-2006, 08:41 PM
I'm using the following code in PHP:

<?php
// Your email address
$email = "TeamStandbyClan@hotmail.co.uk";
// The subject
$subject = "This is a subject";
// The message
$message = "Why, hello...";
mail($email, $subject, $message, "From: $email");
echo "The email has been sent.";
?>

but when I run the script, I get the following message:

Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for TeamStandbyClan@hotmail.co.uk in \\192.168.1.16\webfiles\files\2006-3\678861\email.php on line 8

What's the problem?

Paul Ferrie
06-04-2006, 08:53 PM
Try this

<?php
// Your email address
$email = "TeamStandbyClan@hotmail.co.uk";
// The subject
$subject = "This is a subject";
// The message
$message = "Why, hello...";
mail($email, $subject, $message, "From:". $email);
echo "The email has been sent.";
?>

TUF
06-04-2006, 09:27 PM
Still get the same reply, except, obviously, with the added echo message:

Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for TeamStandbyClan@hotmail.co.uk in \\192.168.1.16\webfiles\files\2006-3\678861\email.php on line 8
The email has been sent.

Anyone got any idea?

Paul Ferrie
06-04-2006, 09:34 PM
Maybe your hosting does not allow for you to use the sendmail method.
It has been known

TUF
06-04-2006, 09:44 PM
-']Maybe your hosting does not allow for you to use the sendmail method.
It has been known

I'm using Ripway.com. Got any other working recommendations?

Paul Ferrie
06-04-2006, 09:47 PM
Got any other working recommendations?

Send them an email and ask them.
i recently had to build a quote form. All worked fine my end but nothing worked on the clients server. It was due to some setting the hosting company had set.

CyanBlue
06-04-2006, 09:52 PM
That'd be the fastest way... Check it with your hosting company... ;)