Hi friends, I have a problem with sending verification mail. When the user registers the script has to send a mail. Actually it is able to send mails to the mails on the same server where i hosted my site.But it is not able to send the verification mail to other mail ids which are not on my server.like @gmail.com,@yahoo.com.... etc Is it a script problem? OR server setup problem? Please someone reply.
this is the script i used for password recovery.... it is also working same as register verification mail thing.it is able to send mails to the addresses hosted on my server.And not able to send to toher mails. code ::: $email = addslashes(trim($_GET['email_recover'])); $sql = mysql_query("SELECT * FROM members WHERE email = '$email'"); $row = mysql_fetch_array($sql); $member = new Member($row,'db'); $fname = $row[fname]; $lname = $row[lname]; $password = $row[password]; if ($email == "") { $msg = "Please enter your email address!"; } elseif ($row == NULL) { $msg = "This email address does not exist in our database!"; } else { $subject = "filemirror.in Password Recovery"; $html_data = "Using the forgot password on our site, you have received this email containing your account details. <br /><br /> Your details are: <br /> Username: <strong>".$row['username']."</strong> <br /> Email: <strong>".$row['email']."</strong> <br /> Password: <strong>".$row['password']."</strong><br /><br /> Thanks, the FileMirror Team. http://www.Filemirror.in"; $mime = new MIME_mail("support@filemirror.in", $member->email, $subject); $mime->attach($html_data, "", HTML, BASE64); $mime->send_mail(); $msg = "<span style=\"color: #92ba1e; font-weight: bold;\">Your password has been sent to your email address!</span>"; } echo $msg; }
Have you checked if your MIME_mail class is installed(uploaded) correctly to your server? Have you included ALL the necessary config files the MIMO_mail requires? Advice : use "(php)" at the beginning of your PHP lines and "(/php)" at the end for better reading. instead of ( --> [ and ) --> ]
Try to send an email with mail($email, $subject, $html_data, $headers); // $headers --> optional BUT : $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: 'sender_email_name' <'sender_email_addr'>'. "\r\n"; PHP: instead of the MIME_mail class to see if it will send the emails to recipients outside of your server/domain.