HI there im hosting my own website and i would like some help sending mail from it using php, after several failures it has left me desperate..
when i use this script:
PHP Code:
ini_set('smtp_port',587);
ini_set('SMTP','outgoing');
ini_set('sendmail_from','working domain');
$subject = 'Request';
$message = $_REQUEST['strname']."\n". $_REQUEST['straddress'] ;
$to="other mail";
$host = "outgoing";
$port = 587;
mail($to, $subject, $message, "FROM: xx <sending mail>", $host);
echo "Thank you for using our mail form";
?>
Even though i inserted every single of information from my (working) outlook 2007 settings (provided from isp)
i got a SMTP auth error "550 Authentication required", and someone told me that it was because i needed to auttenticate the password and username provided from my ISP, and a way to work out that was using PEAR....
however when using the PHP include function to include "mail.php"
i get the:
"Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\m=foruml=0sl=0forum.ws438,239,320,6177 2675\Mail\Request.php on line 46"
SO should keep trying to use PEAR og should i try something else?