Title: Using form method=post with wordpress
Last modified: August 30, 2016

---

# Using form method=post with wordpress

 *  [cjhill](https://wordpress.org/support/users/cjhill/)
 * (@cjhill)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/using-form-methodpost-with-wordpress/)
 * I am trying to integrate a ‘subscribe to newsletter’ feature on my wordpress 
   blog
 * Users just need to enter their name and email address, hit subscribe. This is
   then supposed to send me an email and I add them to the mailing list.
 * I activated the WP SMTP Mail plugin and entered in the relevant email server 
   information to enable WordPress to send emails, asked WordPress to send me a 
   test message and this worked.
 * Now I want to receive an email whenever someone fills in their name & email and
   hit subscribe.
 * If I do this at the moment it just takes me to newsletter_signup.php and I get
   at error message saying…
 * ‘NOT FOUND Apologies, but no results were found for the requested post.’
    Obviously
   this is not right and no email is being sent/received.
 * I have attached my code below, can anyone help me out here?
 * Thanks
 * Code for the signup form sidebar.php – This is not a plugin.
 *     ```
       <form action="newsletter_signup.php" method="post">
       <p><input class="full" type="text" name="fullname" placeholder="Your name*"></p>
          <p><input class="full" type="email" name="Email" placeholder="Your email                                    address*"></p>
       <p><input type="submit" class="sub-btn" value="Subscribe"></p>
                               </form>
       ```
   
 * newsletter_signup.php
 *     ```
       <?php
       $fullname = $_POST['name'];
       $Email = $_POST['Email'];
   
       $to = 'me@myself.com';      
   
       wp_mail($to, $fullname, 'From: ' . $Email);
       echo 'Your request Has Been Sent, Thank You. ';
   
       ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [Bloke](https://wordpress.org/support/users/bloke/)
 * (@bloke)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/using-form-methodpost-with-wordpress/#post-6405475)
 * Where did you get that code for the form? This will not work inside the WordPress/
   Widget set up like you have.

Viewing 1 replies (of 1 total)

The topic ‘Using form method=post with wordpress’ is closed to new replies.

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Bloke](https://wordpress.org/support/users/bloke/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/using-form-methodpost-with-wordpress/#post-6405475)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
