Forum Moderators: coopster
$query2="SELECT settings.siteurl, settings.emailaddress, settings.sitename, landlords.id, landlords.email from settings, landlords WHERE landlords.id = '$id'";
$server = $_SERVER['HTTP_HOST'];
$host = str_replace('www.','',$server);
$st=mysql_query($query2);
$recs=mysql_num_rows($st);
$row2=mysql_fetch_object($st);
$sitename = str_replace("&", "&","$row2->sitename");
$email = "".$row2->emailaddress."";
$landlordsemail = "".$row2->email."";
$subject = "".$sitename."";
$headers = "From: $sitename <notifications@$host>\r\nReply-To: ".$sitename." <".$email.">\r\n";
$message = "Your account with $sitename has now been activated, you can now login with your details:\n\n
Email address: $email\n
*** LANDLORDS LOGIN LINK *** \n
Landlords Login Link: ".$row2->siteurl."landlords-admin/index.php?step=1\n\n
If you have forgotten your password, you can change your password here: \n".$row2->siteurl."landlords-admin/forgotpassword.php
\n\n
Thank you.
$sitename\n
This is an automated response. Please do not reply!";
mail($landlordsemail, $sitename, $message, $headers);
that is my email code but i can't figure out why should it send it to some servers but not to others, i checked the junk box on those servers which don't seem to be receiving the email but they aren't showing and i can't check the logs as i don't have route access, the query is working otherwise it wouldn't work at all but why should it work to some emails and not others, the emails it doesn't work with don't have any special characters other than the @ so are no different to the ones which do.