Jump to content

send email working only on gmail


darhal

Recommended Posts

Posted

Hello,

I made system that send email for account recovery but the email sent only to gmail accounts and not other providers like hotmail idk why ?

Posted
Hello,

I made system that send email for account recovery but the email sent only to gmail accounts and not other providers like hotmail idk why ?

post your PHP file here.

Posted
  
<?php 
       include( "mta_sdk.php" ); 
    $input = mta::getInput(); 
    $to      = $input[0]; 
        $subject = $input[1]; 
        $message = $input[2]; 
        $header = $input[3]; 
         $sent = mail($to, $subject, $message, $header); 
    mta::doReturn($input[0], $sent); 
 ?> 
  

Posted

try to use sth like this

$mail = $subject;  
if (!preg_match("#^[a-z0-9._-]+@(hotmail|live|msn).[a-z]{2,4}$#", $mail))  
{ 
   // your code here  
} 

Posted

like this ?

<?php 
     
include( "mta_sdk.php" ); 
    $input = mta::getInput(); 
    $to      = $input[0]; 
    $subject = $input[1]; 
    $message = $input[2]; 
 $header = $input[3]; 
$mail = $subject; 
if (!preg_match("#^[a-z0-9._-]+@(hotmail|live|msn).[a-z]{2,4}$#", $mail)) 
{ 
   // your code here 
   $sent = mail($to, $subject, $message, $header); 
   mta::doReturn($input[0], $sent); 
} 
 ?> 

Edit : it dont work now for both gmail and hotmail

Posted

@walid That doesn't do anything. it's just for checking. it will not effect.

@darhal Change the headers to avoid being caught in the spam filter.

Posted

There's no problem with the code.

-----------------------------------------------------------------

Free PHP webhosts are just crappy.

Try to change your host into something with cpanel.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...