Northern Flame Posted April 9, 2008 Share Posted April 9, 2008 In my register page, an email is sent out to the user once he/she registers. The email is sent and everything works fine, but the email is sent 2 or 3 days after registering! why is it taking so long? im on a shared host so I can't modify my php.ini file, but is this something that should be changed from the php.ini file? (so that i can contact my host about this). Any ways, just in case it can help, heres my mail() code: <?php $headers = "From: My Website<register@website.com>\r\n"."Reply-To: register@website.com"."\r\n"."X-Mailer: PHP/" . phpversion(); mail("$mail", "Confirmation", " Dear $user, In order to be registered to My Website, you must click the link below. If you do not click that link in 1 week, your account will be deleted! Your login information is listed below (save this information!): Username: $user Password: $pass To complete your registration, click this link: http://www.website.com/members/confirm.php?action=register&username=$user&key=$key This message was brought to you by My Website. Please do not reply to this message. If you did not register to this site, just ignore this email and your information will be taken off our database in 1 week. - My Signature", $headers); ?> Quote Link to comment Share on other sites More sharing options...
eRott Posted April 9, 2008 Share Posted April 9, 2008 The length of time it takes for the mail to be sent is not reliant on your PHP code. It takes such a long time because the server you are using is either a slow server, or perhaps someone is sending out massive amounts of spam mail or some other form of unapproved behavior and is hogging the servers resources. Quote Link to comment Share on other sites More sharing options...
unsider Posted April 9, 2008 Share Posted April 9, 2008 Time is based on server, like eRott said, slow server, slow mail. If you can't contact who controls your server, you may want to invest in your own if this is an important issue. Just what i'd do. Quote Link to comment 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.