darhal Posted June 8, 2015 Share Posted June 8, 2015 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 ? Link to comment
Walid Posted June 8, 2015 Share Posted June 8, 2015 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. Link to comment
darhal Posted June 8, 2015 Author Share Posted June 8, 2015 <?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); ?> Link to comment
Walid Posted June 8, 2015 Share Posted June 8, 2015 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 } Link to comment
darhal Posted June 8, 2015 Author Share Posted June 8, 2015 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 Link to comment
Blaawee Posted June 9, 2015 Share Posted June 9, 2015 @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. Link to comment
darhal Posted June 10, 2015 Author Share Posted June 10, 2015 I m using 000webhosting and I think the problem from there because I dont know how to configure it can any one help me ? Link to comment
DeVo Posted June 10, 2015 Share Posted June 10, 2015 There's no problem with the code. ----------------------------------------------------------------- Free PHP webhosts are just crappy. Try to change your host into something with cpanel. Link to comment
darhal Posted June 10, 2015 Author Share Posted June 10, 2015 They have cpanel already Link to comment
DeVo Posted June 10, 2015 Share Posted June 10, 2015 They have cpanel already They don't, they've something similar to a copy. Use this, https://www.2freehosting.com/ or anything like it. Link to comment
darhal Posted June 10, 2015 Author Share Posted June 10, 2015 Ok thank you i like it but the sub domain doesnt work Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now