adam678 Posted March 27, 2007 Share Posted March 27, 2007 Hi, I recently bought dedicated hosting from sishco.com to host my new site (peelmybell.com ). But I have noticed that a lot of people have been signing up but not activating their accounts, some do, but a lot don't. So I contacted someone who hadn't validated their account to check if there was a problem with the registration process, and he told me he never received the email, I checked with a few others and they told me the same thing. It's not a problem with a specific email service. There are people from hotmail, gmail, aol, yahoo and a few others who haven't received the validation link, but others with the same email service have. I have signed up with 2 of my gmail accounts and my hotmail account and I received the validation email each time, and it never shows up in the spam folder. When I set-up the domain on the server I did nothing to the mail server settings, I just left it with the default settings and it seemed to be working fine, but obviously not. I don't know jack about mail servers, so is there something I need to do to make sure all email are being sent? Here is the PHP that generates the validation email: if ($config['uemail_valid'] == '1') { $subject = ''.$config['sitename'].' Account Validation'; $message = $config['user_validation_email']; $message = str_replace('[username]', $username, $message); $message = str_replace('[password]', $password, $message); $message = str_replace('[siteurl]', $config['siteurl'], $message); $message = str_replace('[sitename]', $config['sitename'], $message); $message = str_replace('[validation_link]', '<a href="'.$config['siteurl'].'/validate/'.$val_num.'/'.$username.'/">'.$config['siteurl'].'/validate/'.$val_num.'/'.$username.'</a>', $message); $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= 'From: '.$config['adminemail'].''; mail($email, $subject, $message, $headers); $update = mysql_query("UPDATE users SET validated = '0' WHERE username = '$username'"); $msg = $lang['reg_complete_e']; $msg = str_replace('[username]', $username, $lang['reg_complete_e']); } Thanks Link to comment https://forums.phpfreaks.com/topic/44472-server-isnt-sending-emails/ Share on other sites More sharing options...
per1os Posted March 27, 2007 Share Posted March 27, 2007 Search the forum, this has been covered many many times and I do not wish to repeat what I already posted 5 times on this forum. Link to comment https://forums.phpfreaks.com/topic/44472-server-isnt-sending-emails/#findComment-216095 Share on other sites More sharing options...
adam678 Posted March 27, 2007 Author Share Posted March 27, 2007 I did search before posting and a lot of people are saying they can't get the emails to send. But I can get the emails to send, they just don't seem to send to everyone for some reason. I get no error messages and so I have no idea where to being in solving this problem. If this has been discussed and solved before then I apologies, but when I searched it was just people looking for help in getting the emails to send, not getting help with the emails not sending to everyone... Link to comment https://forums.phpfreaks.com/topic/44472-server-isnt-sending-emails/#findComment-216154 Share on other sites More sharing options...
trq Posted March 27, 2007 Share Posted March 27, 2007 If its a dedicated server Id'e suggest searching your error logs. It could be a problem with the mail server rather than php. Link to comment https://forums.phpfreaks.com/topic/44472-server-isnt-sending-emails/#findComment-216157 Share on other sites More sharing options...
per1os Posted March 27, 2007 Share Posted March 27, 2007 It could be a problem with the sendmail like thorpe said. But another part of it is that some companies like yahoo and hotmail decide to block mail coming from servers. I know hotmail filters my server's messages to the "junk mail" folder and AOL denys delivery. But one thing that would probably help is the -f feature of sendmail. http://us2.php.net/manual/en/function.mail.php Example 1051. Sending mail with an additional command line parameter. The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path. <?php mail('[email protected]', 'the subject', 'the message', null, '[email protected]'); ?> As I did notice your code does not have that. I do not know if you tried adding the -f in there or not. I would suggest you do that and see what happens. Link to comment https://forums.phpfreaks.com/topic/44472-server-isnt-sending-emails/#findComment-216167 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.