FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Today's Messages (on)  | Unread Messages (off) | Subscribed Forums (off) | Subscribed Topics (off) | Unanswered Messages (off)

Forum: comp.lang.php
 Topic: Use PHP to populate a Mailing list from a webpage
Re: Use PHP to populate a Mailing list from a webpage [message #185588 is a reply to message #185586] Thu, 17 April 2014 03:34
Arno Welzel is currently offline  Arno Welzel
Messages: 280
Registered: October 2011
Karma:
Senior Member
add to buddy list
ignore all messages by this user
Graham Hobbs, 2014-04-17 05:26:

> I am at PHP 101 level. I have a webpage that asks a user to enter
> their name in one box, email address in another and click send. That's
> works OK (almost):-).
>
> I also have created an empty Mailing list 'List-B' in my Mozilla
> Thunderbird to which I want to automatically add the email addresses
> sent from the webpage.

This is not possible, since Thunderbird is not running on the same
computer as your website.

Two ideas:

If you want to maintain mailing lists on the server you need software
like Mailman. This can be installed additionally to the webserver and
you can use the command line interface of mailman to add users to
existing mailing lists which will then accept mails using a "virtual"
e-mail address (e.g. "customers(at)lists(dot)domain(dot)example").

OR:

Setup an LDAP server and use the LDAP directory as address book in
Thunderbird. From PHP you can then also add members to the LDAP directory.


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de
Re: Use PHP to populate a Mailing list from a webpage [message #185589 is a reply to message #185588] Thu, 17 April 2014 06:49
Denis McMahon is currently offline  Denis McMahon
Messages: 572
Registered: September 2010
Karma:
Senior Member
add to buddy list
ignore all messages by this user
On Thu, 17 Apr 2014 09:34:07 +0200, Arno Welzel wrote:

> Graham Hobbs, 2014-04-17 05:26:
>
>> I am at PHP 101 level. I have a webpage that asks a user to enter their
>> name in one box, email address in another and click send. That's works
>> OK (almost):-).
>>
>> I also have created an empty Mailing list 'List-B' in my Mozilla
>> Thunderbird to which I want to automatically add the email addresses
>> sent from the webpage.
>
> This is not possible, since Thunderbird is not running on the same
> computer as your website.
>
> Two ideas:
>
> If you want to maintain mailing lists on the server you need software
> like Mailman. This can be installed additionally to the webserver and
> you can use the command line interface of mailman to add users to
> existing mailing lists which will then accept mails using a "virtual"
> e-mail address (e.g. "customers(at)lists(dot)domain(dot)example").

Observation to the OP: If you do this, you will need to ensure that
mailman only sends mail that is genuinely from you somehow, otherwise
there is a risk, if the virtual email address is ver exposed, of spammers
using your server to spam people on your mailing list.

> Setup an LDAP server and use the LDAP directory as address book in
> Thunderbird. From PHP you can then also add members to the LDAP
> directory.

Thunderbird can also import address book data from csv files, but it
doesn't seem to have an easy way to take a group of existing email
addresses and put them in a mailing list :(

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: Use PHP to populate a Mailing list from a webpage [message #185590 is a reply to message #185589] Thu, 17 April 2014 08:56
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 961
Registered: September 2010
Karma:
Senior Member
add to buddy list
ignore all messages by this user
On 17/04/14 11:49, Denis McMahon wrote:
> On Thu, 17 Apr 2014 09:34:07 +0200, Arno Welzel wrote:
>
>> Graham Hobbs, 2014-04-17 05:26:
>>
>>> I am at PHP 101 level. I have a webpage that asks a user to enter their
>>> name in one box, email address in another and click send. That's works
>>> OK (almost):-).
>>>
>>> I also have created an empty Mailing list 'List-B' in my Mozilla
>>> Thunderbird to which I want to automatically add the email addresses
>>> sent from the webpage.
>>
>> This is not possible, since Thunderbird is not running on the same
>> computer as your website.
>>
>> Two ideas:
>>
>> If you want to maintain mailing lists on the server you need software
>> like Mailman. This can be installed additionally to the webserver and
>> you can use the command line interface of mailman to add users to
>> existing mailing lists which will then accept mails using a "virtual"
>> e-mail address (e.g. "customers(at)lists(dot)domain(dot)example").
>
> Observation to the OP: If you do this, you will need to ensure that
> mailman only sends mail that is genuinely from you somehow, otherwise
> there is a risk, if the virtual email address is ver exposed, of spammers
> using your server to spam people on your mailing list.
>
>> Setup an LDAP server and use the LDAP directory as address book in
>> Thunderbird. From PHP you can then also add members to the LDAP
>> directory.
>
> Thunderbird can also import address book data from csv files, but it
> doesn't seem to have an easy way to take a group of existing email
> addresses and put them in a mailing list :(
>

If the security of the site IS in fact assured you can use PHP to output
a mailto: URL that can contain dozens of mail addresses.

In this case the web server IS the address book.,

A link that says

<a HREF="mailto:To@domain?bcc=recipent@domain,reciepen@domain">Click
here to send mail</a>

is the sort of thing..





--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: Use PHP to populate a Mailing list from a webpage [message #185591 is a reply to message #185586] Thu, 17 April 2014 10:49
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 666
Registered: October 2010
Karma:
Senior Member
add to buddy list
ignore all messages by this user
Graham Hobbs wrote:

> I am at PHP 101 level.

Pardon my saying so, but you are at *Internet* 101 level.

> I have a webpage that asks a user to enter their name in one box, email
> address in another and click send. That's works OK (almost):-).
>
> I also have created an empty Mailing list 'List-B' in my Mozilla
> Thunderbird to which I want to automatically add the email addresses
> sent from the webpage.

Not reasonably possible. *Such* a "Mailing list" is maintained client-side.
The Web application processing the user input runs server-side. Also be
sure that you have users confirm from their e-mail accounts that they really
want to subscribe (opt-in).

You appear to have a misconception of the term “mailing list” and its
implementation. What you can maintain in e-mail clients is a distribution
list which is something else. Look up those terms.

> When the page gets back to my PHP pgm, can it add the email address to

pgm?

> my mailing list without manual intervention?

Only if you are maintaining the mailing list or distribution list server-
side.

> Am not fond of mixing languages, etc so a pure PHP solution would be
> appreciated unless design wise not clever.

AFAIK the most common mailing list management software, Majordomo, is
written in Perl.

> Have googled, not found anything closely relevant.

“PHP mailing list” yields a lot of relevant results among the 161'000'000
hits. Indeed, the first hit, ListMessenger, is relevant already.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Re: Use PHP to populate a Mailing list from a webpage [message #185592 is a reply to message #185589] Thu, 17 April 2014 11:15
Graham Hobbs is currently offline  Graham Hobbs
Messages: 39
Registered: September 2010
Karma:
Member
add to buddy list
ignore all messages by this user
On Thu, 17 Apr 2014 10:49:44 +0000 (UTC), Denis McMahon
<denismfmcmahon(at)gmail(dot)com> wrote:

> On Thu, 17 Apr 2014 09:34:07 +0200, Arno Welzel wrote:
>
>> Graham Hobbs, 2014-04-17 05:26:
>>
>>> I am at PHP 101 level. I have a webpage that asks a user to enter their
>>> name in one box, email address in another and click send. That's works
>>> OK (almost):-).
>>>
>>> I also have created an empty Mailing list 'List-B' in my Mozilla
>>> Thunderbird to which I want to automatically add the email addresses
>>> sent from the webpage.
>>
>> This is not possible, since Thunderbird is not running on the same
>> computer as your website.
>>
>> Two ideas:
>>
>> If you want to maintain mailing lists on the server you need software
>> like Mailman. This can be installed additionally to the webserver and
>> you can use the command line interface of mailman to add users to
>> existing mailing lists which will then accept mails using a "virtual"
>> e-mail address (e.g. "customers(at)lists(dot)domain(dot)example").
>
> Observation to the OP: If you do this, you will need to ensure that
> mailman only sends mail that is genuinely from you somehow, otherwise
> there is a risk, if the virtual email address is ver exposed, of spammers
> using your server to spam people on your mailing list.
>
>> Setup an LDAP server and use the LDAP directory as address book in
>> Thunderbird. From PHP you can then also add members to the LDAP
>> directory.
>
> Thunderbird can also import address book data from csv files, but it
> doesn't seem to have an easy way to take a group of existing email
> addresses and put them in a mailing list :(
---
Denis (to you principally, many thanks all),

Msgs rcvd, some understood, some need my looking into but I have a
starting point. A must "I do want the list on my home machine" - that
ends Mailman, right? LDAP idea I need to learn more. CSV seems to be
an answer, I think.

For another system, I have a php pgm running at my ISP's server (the
design/build not altogether my doing (a lot to do with you lot
actually):-) that receives user pages, extracts user filled fields and
emails them to a Pegasus client running on my home machine. A REXX
polls the Pegasus directory 24/7 and deals with each email as it
arrives - no manual intervention whatsoever.

Sounds like I could do exactly the same. I once only create a csv
file, append thereto as emails come in, and at the end of a day
manually import into Thunderbird, empty the csv file ready for a new
set of email addresses - sounds like a goer .. except I don't fully
understand your comments about 'easy way to take a group' - I wouldn't
want to have a bunch of csv files each with one address and have to
manually load into the Mailing list.

Feasible, sensible, any comments welcome but sort of getting away from
php - so Jerry, I know the story! :-))

Graham



Current Time: Thu Apr 17 12:34:35 EDT 2014

Total time taken to generate the page: 0.01300 seconds