Hi there,
I wonder if it is possible to store the content of a field from a form filled by a visitor in a variable (stored in a .txt file) ?
The case :
I want the visitors to be able to subscribe to a newsletter by entering their email adress. My idea was to add all the adresses to a variable that would finally contain the whole mailing list.
Thanks for your help.
How will you be sending emails to the mailing list? Will it be via service like Mailchimp? You may as well send it straight through to them, rather than store it (which comes with privicy / data protection concerns). I have done this a couple of times recently and can help with it if you need.
It is possible if you store it in a structure field, for example. But @jimbobrjames is absolutely right concerning privacy… Also, using a service is generally a better idea than trying to send from your own server.
They also automatically handle duplicate submissions (I know Mailchimp does). If the same person signs up twice, the second submission simply does not get added, so thats something less you need to handle in your code.
And double opt-in and unsubscribing… 
We definitely should get some money from all these providers… 
Thanks a lot you both. Using an ad-hoc service seems definitely the best option.
Problem is that I want to keep their email adress so as to be able to send to the subscriber further informations.
I’ll take a closer look at mail chimp. I see that someone developped a plugin.
Thx for your help.
Mailchimp keeps a list of subscribers, you dont loose that. It builds up a list and then you use mailchimps tools to send emails to it as required. You can export the list.