Ich glaube, da wurde etwas missverstanden. Ich möchte die Nutzer nicht automatisch auf [COLOR=#000000][COLOR=#DD0000]"status": "subscribed" [/COLOR][/COLOR][FONT=arial]setzen. Es soll nur eine Erleichterung erfolgen, dass sie mich via email erreichen. D.h. der Aufruf der Website, die Eingabe der Emailadresse und das Problem mit einer schlechten Internetverbindung entfällt.
Anschließend sollen sie schon den Newsletter bestätigen.
Wenn ich mir die Adressen händisch aus meinem mailserver ziehen muss, ist das natürlich aufwändiger und ich muss mal schauen, ob das bei mailpoet überhaupt die opt in Routine auslöst.
Edit:
Das geht so in meine Richtung: https://support.mailpoet.com/knowledgebase/…form-integrate/
[/FONT]
Code
function processMyForm(){
//you could make some validation even though validation
//is also processed in our function
$my_email_variable = $_POST['my_email_variable'] ;
$my_list_id1 = $_POST['my_list_id1'] ;
$my_list_id2 = $_POST['my_list_id2'] ;
//in this array firstname and lastname are optional
$user_data = array(
'email' => $my_email_variable,
'firstname' => $firstname,
'lastname' => $lastname);
$data_subscriber = array(
'user' => $user_data,
'user_list' => array('list_ids' => array($my_list_id1,$my_list_id2))
);
$helper_user = WYSIJA::get('user','helper');
$helper_user->addSubscriber($data_subscriber);
//this function will add the subscriber to mailpoet
//if double optin is on it will send a confirmation email
//to the subscriber
//if double optin is off and you have an active automatic
//newsletter then it will send the automatic newsletter to the subscriber
}
//initialize this function only when your subscription form data has been posted
add_action('init','processMyForm') ;
Alles anzeigen
[FONT=arial]
[/FONT]