1

I want to create send email form for wordpress page. WordPress did not allow php But I can use php by using some plugin.

The problem is I did not know how to create it. I can not make php file separate. Following is my html code. please help me to write php code. php should be separate I can insert it at top or bottom of page. but not in separate file

    <form action="" method="post">
  <div class="form-group">
    <label name="first_name">Name:</label>
    <input type="text" class="form-control">
  </div>
  <div class="form-group">
    <label name="email">Email:</label>
    <input type="email" class="form-control" name="email">
  </div>
  <div class="form-group">
    <label name="subject">Subject:</label>
    <input type="text" class="form-control" name="subject">
  </div>
  <div class="form-group">
    <label name="message">Message:</label>
    <textarea type="textarea" rows="5" class="form-control" name="message"></textarea>
  </div>
  <button type="submit" name="submit" class="btn btn-default">Send</button>
</form>
vitr
  • 6,766
  • 8
  • 30
  • 50

1 Answers1

0

WordPress has a lot of useful plugins for sending mails. I would recommend you to check this: https://pl.wordpress.org/plugins/contact-form-7/

If I'm understanding correctly, you need a contact form to send messages from your WordPress page. Plugin above is very good for things like this and it provides possibility to style your form.

Nefryt
  • 13
  • 2
  • I did not want to use Plugin – naveed Softdukan Sep 03 '16 at 09:31
  • I see. So there a topic that might be helpful - http://stackoverflow.com/questions/5335273/how-to-send-an-email-using-php Btw. - you can place your code in the same file and then you don't need to specify **action** in your form. – Nefryt Sep 03 '16 at 09:50