views:

37

answers:

3

hi,

I need a simple module in Drupal to collect e-mail addresses of my users.

In other terms, I would like to show a "registration option" to collect their e-mail addresses and in the back-end have an option to export a file with the list of addresses.

Thanks

ps. I would like to be able to let people to submit their email address even if they decide to not register to my website.

+1  A: 

The Webform Module can be used to do this:

This module adds a webform nodetype to your Drupal site. Typical uses for Webform are questionnaires, contact or request/register forms, surveys, polls or a front end to issues tracking systems.

Submissions from a webform are saved in a database table and can optionally be mailed to a nominated e-mail address upon submission. Past submissions are viewable for users with the correct permissions.

And you can use the SQL to export the table as:

SELECT * FROM webform_submitted_data INTO OUTFILE 'file_name' 
Keith Morgan
A: 

I don't think there is already a module that implements such functionality.

Webform module only creates a new content type, but it doesn't allow users to fill the content of a form only when they check an option in their profile page.

What you ask can be easily implemented with a custom module, which would show a checkbox in the user profile (or when a user is registering), and which would implement a page that allows you to export the email addresses. It could also implement hook_cron() to export the email address in a file automatically.

Any implementation should take in consideration that users can change idea in every moment, and their email address should be removed in that case.

kiamlaluno
A: 

I've solved with "SimpleNews" module. I don't use it to send e-mails but just collect address and then use the Export functionality.

Patrick

related questions