the sales-departement of the company I work for uses OpenEMM.
They have several mailing-lists, but there is no way to subscribe to them on our website.
So my task is, to create a form on our website with the possibility to do a single registration for all mailing-lists the user wants to have.
To have a state of the art version, it should use the OpenEMM Double Opt-In function.
What I've done so far:
- Created a new page with HTML & PHP
Read the ID and Name of all mailing-lists from the database into an array
Created a new form with a checkbox for each mailing-list, input-fields for firstname, lastname, email, radio-buttons for gender and mailtype
Created some own validation functions
For every checked mailing-list I create a form with hidden fields containing all the information needed (after all data is validated).
Lets look at an example:
This form with it's own unique name is created for every checked mailing list.This one is for the mailing-list X (instead of the ID)
<form name="subform X" method="post" action="http://newsletter.ourserver.com:8080/form.do" onSubmit="return check();" target="_blank">'
<input type="hidden" name="agnCI" value="1">
<input type="hidden" name="agnFN" value="subscribe">
<input type="hidden" name="agnSUBSCRIBE" value="1">
<input type="hidden" name="agnMAILINGLIST" value="X">
<input type="hidden" name="firstname" value="firstname from the form">
<input type="hidden" name="lastname" value="lastname from the form">
<input type="hidden" name="EMAIL" value="email from the form">
<input type="hidden" name="mailtype" value="chosen mailtype">
<input type="hidden" name="gender" value="chosen gender">
</form>
The next step is to submit ALL of the forms, so the one form for each mailing-list.
I tried it with with a
And now the strange thing:<body onLoad="document.subformX.submit();document.subformY.submit(); ...">
The script submits the forms correctly to the database, means that a new recipient is added and it is printing for the checked mailing-lists "status: waiting for double opt-in confirmation" on the users page in the openemm-backend.
So it has processed all the forms that it should.
But the only problem, and thats the biggest one, OpenEMM sends the subscription-confirmation-request-email only for the first form, the first checked mailing-list.
I would understand it if the status for only the first mailing-list would be "waiting for double opt-in confirmation", but all relevant ones were added.
So, what could be the reason that OpenEMM sends only one email? Maybe a limitation of the mailserver to prevent spam? Any experiences with that problem?
TIA
pheelix