Forum Moderators: coopster
The original message was received at Tue, 26 Oct 2004 01:23:54 +0100 (BST)
from 213-xx-xx-xx.example.uk [213.xx.xx.xx]
----- The following addresses had permanent delivery errors -----
@example.uk
(expanded from: <>)
my smtp settings are set to my isp's mail server, is it something to do with microsoft's measures to combat spam?
sorry, i'd ask the authors but support for this book is non existent.
my function looks like this:
function send_message($to,$cc,$subject,$message){
//send one email via PHP
global $_SESSION;
if(!db_connect())return false;
$query="
select address from users
where username = '".$_SESSION['auth_user']."'
";
$result=mysql_query($query);
if(!$result)return false;
else if(mysql_num_rows($result)==0)return false;
else{
$other='From: '.mysql_result($result,0,'address')."\r\nCc: $cc";
if(mail($to,$subject,$message,$other))return true;
else return false;
}
}
spritch2
[edited by: jatar_k at 3:32 am (utc) on Oct. 26, 2004]
[edit reason] generalized ip's and emails [/edit]
$from = mysql_result($result,0,'address');
$other='From: '.$from . "\r\n";
$other.="Cc: $cc\r\n";
you also probably need the \r\n after the Cc:
I also try to remember to only use " instead of ' in my headers so that I don't inadvertently put single quotes around a \r\n which won't work. ;)