Go to the home directory of the account , /home/acct/public_html
create a file as php.php and set ownership as,
chown acct.acct php .
Open using vi editor and add the following,
<?php
$to = "[email protected],[email protected]";
$subject = "Test mail using PHP script";
$body = "Test mail sent using php script";
if(mail($to,$subject,$body)){
echo "Test mail sent to $to ...!!!\n";
echo "Subject = $subject\n";
echo "Body = $body\n";
}
else
echo "ERROR: Mail did not send using script";
?>
now you can paste the url in browser
domain.com(acct)/php.php Mail will be send
Done
create a file as php.php and set ownership as,
chown acct.acct php .
Open using vi editor and add the following,
<?php
$to = "[email protected],[email protected]";
$subject = "Test mail using PHP script";
$body = "Test mail sent using php script";
if(mail($to,$subject,$body)){
echo "Test mail sent to $to ...!!!\n";
echo "Subject = $subject\n";
echo "Body = $body\n";
}
else
echo "ERROR: Mail did not send using script";
?>
now you can paste the url in browser
domain.com(acct)/php.php Mail will be send
Done