Possible Duplicate:
Send email of form data?

So I have a simple three field form which I've created in HTML/CSS, see here:

Simple email sign up form

Now I want to put this into a block module, generate the form fields using Drupal Form API (is this appropriate or should I just stick with my existing HTML markup?). And on submission of the form I want it to email the details to a designated email. Is Drupal Triggers appropriate for this, if not, what is?

Any guidance on where to go with this would be amazing. Thanks so much for your time :)


The easiest way is to create the form using webform module. This will also send an email to a chosen address. Unfortunately this will create just a normal page, not a block.

To show it in a block you'll need to create a view that renders the whole webform (which is a node) or to use mini panels with the same rendered node.


Use simple news module which will give you lots of e-newsletter features out of the box.

For new features you can extend above module to suit your specific requirements.


There are several approaches to this problem,

  • You can use "webform " module and theme it using $form[theme], your start can be here
  • you can use Form API to create a custom form. Your good start is FORM API Guide
  • To trigger a Mail on submission, you can use rules OR triggers OR just a submit function

Not the answer you're looking for? Browse other questions tagged or ask your own question.