6 posts
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • 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
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 1 and 9 items
  • United Kingdom
  • Has been a member for 2-3 years
BenSheppard says

Have you checked your spam?

6 posts
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • Qatar
netao85 says

Have you checked your spam?

yes, no message

590 posts
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 4-5 years
  • Europe
  • Exclusive Author
  • Referred between 50 and 99 users
  • Bought between 100 and 499 items
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
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • 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