6 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Located in Qatar
netao85 says
just bought it http://themeforest.net/item/minimal-coming-soon/233228

trying to use the email subscribe form, it seems ok to add an email, however i never receive it in my email box, tried different emails addresses, but can’t receive can someone help me with the php code (code below)?

<?php

function isValidEmail( $email = null ) { return preg_match( ”/^ [\d\w\/+!=#|$? {^x%x }`’~-]

[A-Z0-9]

$email ); }

/ Check if email has been posted / if ( isset($_POST[‘email’]) ) {

/ Validate email /
if ( isValidEmail($_POST['email']) ) {
/ Send mail notification */
$to = 'robertb1972@hotmail.com'; // Your e-mail
$subject = 'New subscriber';
$message = 'Hi, you have one new subscriber. This is his/her e-mail address: ' . $_POST['email'] . '.';
$headers = "From:" . $_POST['email'];
mail($to,$subject,$message,$headers);
echo 'successful';
} else {
    echo 'invalid_email';
}

}

1034 posts
  • Has sold $100+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
BenSheppard says

Have you checked your spam?

6 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Located in Qatar
netao85 says

Have you checked your spam?

yes, no message

590 posts
  • Has referred 50+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
CodeSwift says

Edit

Never mind, i thought it’s a WP theme, just noticed it’s HTML template.

So what does it return, “successful” or “invalid_email”?

6 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Located in Qatar
netao85 says

i just found the problem my hosting service asks that the sender email should be from the same domain

by
by
by
by
by
by