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
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Sells items exclusively 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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by