lovephp Posted November 6, 2012 Share Posted November 6, 2012 friends i made a mailing script with multiple mail() to send mail to 3 difrent emails. Now my question is that the script works jus fine on my webhost and sends email to all 3 email ids. I tried the same script on my friends webhost but now the script from his host will not send mail to yahoo, gmail and hotmail acounts tho if i enter any othr email id eg. Admin@somedomain.com the mail gets delivered. Where is the problem any idea? Does it have to do something with his webhost or some server settings?? Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/ Share on other sites More sharing options...
jazzman1 Posted November 6, 2012 Share Posted November 6, 2012 What kind of transport do you use? Can you show us the script? Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1390519 Share on other sites More sharing options...
lovephp Posted November 6, 2012 Author Share Posted November 6, 2012 script is simple $to = 'email1@domain.com'; $to_forward = 'me@yahoo.com'; then regular headess from, reply-path etc. Sory actualy i am on cel ph now so unable to post the code. Il in a few hours. The script seem to work ok on my shared hosting but when use my friends webhost apart from the free email providers like yahoo, gmail, hotmail the mail gets send to eg. me@myowndomain.com Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1390522 Share on other sites More sharing options...
lovephp Posted November 6, 2012 Author Share Posted November 6, 2012 ok here is the code $cid = $_SESSION['cid']; $orderid = randomPrefix(6); $ip = getip(); date_default_timezone_set('Asia/Calcutta'); $date = date('m/d/Y', time()); $time = date('h:i:s a', time()); $to = $fData['email']; $to_bill = "$forward_email"; $to_company = "${$cid}"; $fname = $fData['fname']; $lname = $fData['lname']; $address1 = $fData['address1']; $address2 = $fData['address2']; $country = $fData['country']; $city= $fData['city']; $state = $fData['state_p']; $zipc = $fData['zcode']; $phone = $fData['phone']; $holder = $fData['cname']; $type = $fData['ctype']; $plan = $fData['plans']; $cnumber = $fData['cnumber']; $expiry_m = $fData['xmonth']; $expiry_y = $fData['xyear']; $headers = "From: $company_name <$company_email>\r\n"; $headers .= "Reply-To: <$company_email>\r\n"; $headers .= "Return-Path: $company_email\r\n"; $headers .= 'MIME-Version: 1.0' . "\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'Content-type: text/html; charset=us-ascii' . "\r\n"; 'X-Mailer: PHP/' . phpversion(); $subject = "(Order Confirmation) - $company_name"; mail($to, $subject, $message1, $headers); mail($to_company, $subject, $message2, $headers); mail($to_bill, $subject, $message3, $headers); works fine from my webhost sends email to yahoo, gmail, hotmail but does not send emai; to yahoo, gmail or hotmail from my friends webhost. Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1390636 Share on other sites More sharing options...
Zane Posted November 6, 2012 Share Posted November 6, 2012 (edited) Try taking out the return breaks in your header \r and see if it works? Edited November 6, 2012 by Zane Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1390637 Share on other sites More sharing options...
lovephp Posted November 6, 2012 Author Share Posted November 6, 2012 did not work mate any idea? Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1390642 Share on other sites More sharing options...
winningdave Posted November 7, 2012 Share Posted November 7, 2012 Is your server maybe not allowing outgoing mail? Maybe try PHPMailer and use authenticated SMTP. I've had troubles on shared servers before and weird IIS configs and that usually solves it Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1390794 Share on other sites More sharing options...
Muddy_Funster Posted November 7, 2012 Share Posted November 7, 2012 it's not likely to be a transport level issue as the domain email is going. I suspect it's a header missmatch in the domain of the server and the sender domain in the mail script. mx record lookup is on of the main header checks done by most mail servers as a standard spam filtering step. webmail hosts have generaly got better spam filtering than domain hosts because the also generaly have way more accounts to maintain. Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1390852 Share on other sites More sharing options...
JonnoTheDev Posted November 7, 2012 Share Posted November 7, 2012 The server is probably on a spam database. This is a problem using a shared server. Find out what the IP address of your server is. You can simply ping your domain to get this. Once you have the IP address go to the following URL http://www.webwiz.co.uk/domain-tools/spam-database-lookup.htm Enter the IP and click search. If the IP comes up as blacklisted on any of the databases you will have to either contact your webhost to get it removed or go to the database in question and try to get it removed yourself. Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1390864 Share on other sites More sharing options...
lovephp Posted November 8, 2012 Author Share Posted November 8, 2012 it shows listed on just this 2 sites b.barracudacentral.org bl.spamcannibal.org does this has to do something? Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1391076 Share on other sites More sharing options...
JonnoTheDev Posted November 8, 2012 Share Posted November 8, 2012 Yes. This is your problem. Shared hosts are often on spam mail databases as other users of the web server are probably running scripts to send out lots of email. Contact your web host and get them to sort this out. Once this server has been removed from the databases you will find that your email gets through to hotmail, gmail, etc. However, there is still the chance that the server will be blacklisted again in the future. You will have to raise this issue with the web host. Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1391095 Share on other sites More sharing options...
lovephp Posted November 8, 2012 Author Share Posted November 8, 2012 Yes. This is your problem. Shared hosts are often on spam mail databases as other users of the web server are probably running scripts to send out lots of email. Contact your web host and get them to sort this out. Once this server has been removed from the databases you will find that your email gets through to hotmail, gmail, etc. However, there is still the chance that the server will be blacklisted again in the future. You will have to raise this issue with the web host. thanks mate Quote Link to comment https://forums.phpfreaks.com/topic/270353-php-mai-question/#findComment-1391110 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.