mikhl Posted August 10, 2011 Share Posted August 10, 2011 Hi, I am using a simple mail() function to send a confirmation email to users. However, when they receive the email (i am currently testing this with my hotmail account) it states that it is not trusted. Quoted from hotmail: This message looks suspicious to our SmartScreen filters. Does anyone have any ideas as to why this is happening, whether to do with my code or not. This is the code that I am using at the moment: $sendto = '[email protected]'; // using this email to test.. would be users email $subject = "Confirmation"; // Subject $message = "Hi $fname $sname ($uname), \n\n Thanks for joining us. \n To activate your account you first need to confirm your email address. To do this click the link below: \n\n"; $message .= "http://thelink.com"; $header = "From: [email protected]\r\n"; //return $message; mail($sendto, $subject, $message, $header); Thanks Quote Link to comment https://forums.phpfreaks.com/topic/244398-mail-not-trusted/ Share on other sites More sharing options...
trq Posted August 10, 2011 Share Posted August 10, 2011 Are you sending this email from the same server as the domain in the From header? Quote Link to comment https://forums.phpfreaks.com/topic/244398-mail-not-trusted/#findComment-1255222 Share on other sites More sharing options...
mikhl Posted August 10, 2011 Author Share Posted August 10, 2011 Hmm... no, I am using a temporary domain to host whilst in the testing stages. Would this cause a problem? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/244398-mail-not-trusted/#findComment-1255223 Share on other sites More sharing options...
trq Posted August 10, 2011 Share Posted August 10, 2011 That would have the potential to cause issues. Basically the email is saying it is from a different location to what the client actually received it from. Quote Link to comment https://forums.phpfreaks.com/topic/244398-mail-not-trusted/#findComment-1255226 Share on other sites More sharing options...
mikhl Posted August 10, 2011 Author Share Posted August 10, 2011 Thanks, that has done the trick. Quote Link to comment https://forums.phpfreaks.com/topic/244398-mail-not-trusted/#findComment-1255228 Share on other sites More sharing options...
zero477 Posted July 11, 2012 Share Posted July 11, 2012 Excelent thead thank you for your help. Quote Link to comment https://forums.phpfreaks.com/topic/244398-mail-not-trusted/#findComment-1360782 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.