Page 1 of 1

Mailchimp and Confirm Subscription email

PostPosted: April 2nd, 2011, 3:49 pm
by lucjager
Is it possible to not send my user the mail that contains this: Confirm Subscription and afther that Thank you for subscribing?

-----------------------email example from mailchimp----------
Confirm Subscription
Click here to confirm your subscription to our list.

If you received this email by mistake, simply delete it. You won't be subscribed if you don't click the confirmation link above.

For questions about this list, please contact:
---------------------------------------------------------------------

I hope this is possible ;-)

Luc

Re: Mailchimp and Confirm Subscription email

PostPosted: April 2nd, 2011, 4:32 pm
by Cristián Lávaque
That'd be a MailChimp setting, where you don't require a subscription confirmation (double opt-in).

Re: Mailchimp and Confirm Subscription email

PostPosted: April 2nd, 2011, 4:38 pm
by lucjager
do you perhaps know where i can change these settings in mailchimp?

~Luc

Re: Mailchimp and Confirm Subscription email

PostPosted: April 2nd, 2011, 4:45 pm
by Cristián Lávaque
I'm not familiar with MailChimp setup, and it seems they strongly push double opt-ins, so I don't know how you'd change that for a list. I did see mentioned in the articles I found, that single opt-in is possible with your own forms (not the ones they generate), but didn't say how exactly.

I'm guessing that if it isn't easy to single opt-in with the normal approach s2Member uses to add people to the email list, you will have to do something more advanced using the Notifications API found at WP Admin -> s2Member -> API / Notifications.

Re: Mailchimp and Confirm Subscription email

PostPosted: April 2nd, 2011, 4:56 pm
by Cristián Lávaque

Re: Mailchimp and Confirm Subscription email

PostPosted: April 3rd, 2011, 3:35 pm
by lucjager
Hi cristian,

Thanks aggain for you superb support!
But i found out that if you change the mailchimp api file from s2member (nc-mcapi.inc.php) that you can force single opt-in by setting: $double_optin=true into false. (just becare full that your account wont be blocked because of spamming).

Change:
Code: Select all
function listSubscribe($id, $email_address, $merge_vars, $email_type='html', $double_optin=true, $update_existing=false, $replace_interests=true,


into
Code: Select all
function listSubscribe($id, $email_address, $merge_vars, $email_type='html', $double_optin=false, $update_existing=false, $replace_interests=true,


But if i do that the website displays the following error:
Warning: Cannot modify header information - headers already sent by (output started at /home/lucjager/domains/lucdejager.nl/public_html/estss/wp-content/plugins/s2member/includes/mailchimp/nc-mcapi.inc.php:1) in /home/lucjager/domains/lucdejager.nl/public_html/estss/wp-content/plugins/s2member/includes/classes/registrations.inc.php on line 820

~Luc

Re: Mailchimp and Confirm Subscription email

PostPosted: April 3rd, 2011, 8:39 pm
by Cristián Lávaque
Good for finding that! I had not checked that file first (I guess I should have :P).

That, by the way, will be the default value of that variable, so if when called it is defined as true, it'll be true despite your false.

You should use a hook inside that function and change it with that, but I see there aren't any there yet, I'll ask Jason about it.

In the meantime you can edit that function and change it here
Code: Select all
$params["double_optin"] = $double_optin; 
to false
Code: Select all
$params["double_optin"] = false; 


See if that does the trick. Remember it'll be lost after the next update and you'll need to do it again.

The error you got is normally cause when something is sent to the browser before it should have.You must have introduced a space or newline outside the PHP sections marked by <?php and ?>.

Re: Mailchimp and Confirm Subscription email

PostPosted: April 4th, 2011, 4:42 am
by lucjager
i'll try that and i'll let you know,

suggestion for the forum / website:

Make an specific FAQ on the website or forum which containts the most usefull tips for s2members so you dont have to answer solutions like this anymore in the future ;-)

Thanks,

~Luc

Re: Mailchimp and Confirm Subscription email

PostPosted: April 4th, 2011, 4:47 am
by lucjager
Sorry cristian for the message but your codes also generates the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/lucjager/domains/lucdejager.nl/public_html/estss/wp-content/plugins/s2member/includes/mailchimp/nc-mcapi.inc.php:1) in /home/lucjager/domains/lucdejager.nl/public_html/estss/wp-content/plugins/s2member/includes/classes/registrations.inc.php on line 820

~Luc

Re: Mailchimp and Confirm Subscription email

PostPosted: April 4th, 2011, 5:17 am
by Jason Caldwell
lucjager wrote:Make an specific FAQ on the website or forum which containts the most usefull tips for s2members so you dont have to answer solutions like this anymore in the future ;-)

Please see: Common Questions/Problems/Tips :D

Re: Mailchimp and Confirm Subscription email

PostPosted: April 4th, 2011, 5:22 am
by lucjager
nice but maybe make it available on your website so if you have like 100 more tips and qeustions that you can create a better overview (or categorise it) (please think ahead in the future if you have like 100 or even 1000 tips etc (how am i as an user going to find what i need) )

:D for now super support!

Re: Mailchimp and Confirm Subscription email

PostPosted: April 4th, 2011, 12:21 pm
by Cristián Lávaque
lucjager wrote:Sorry cristian for the message but your codes also generates the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/lucjager/domains/lucdejager.nl/public_html/estss/wp-content/plugins/s2member/includes/mailchimp/nc-mcapi.inc.php:1) in /home/lucjager/domains/lucdejager.nl/public_html/estss/wp-content/plugins/s2member/includes/classes/registrations.inc.php on line 820


Are you sure you don't have an empty line or even a single space before the <?php or after the ?>?

Re: Mailchimp and Confirm Subscription email

PostPosted: April 7th, 2011, 7:27 am
by Jason Caldwell
This part of the error:
.../wp-content/plugins/s2member/includes/mailchimp/nc-mcapi.inc.php:1

This indicates output is starting at line #1 of the nc-mcapi.inc.php file.
Which is most likely due to a space, tab, or line break at the very top of the file.

Re: Mailchimp and Confirm Subscription email

PostPosted: April 7th, 2011, 7:28 am
by Jason Caldwell
lucjager wrote:nice but maybe make it available on your website so if you have like 100 more tips and qeustions that you can create a better overview (or categorise it) (please think ahead in the future if you have like 100 or even 1000 tips etc (how am i as an user going to find what i need) )

:D for now super support!

Gotchya. Great idea!
Thanks for the suggestion.

Re: Mailchimp and Confirm Subscription email

PostPosted: April 7th, 2011, 7:32 am
by lucjager
the file now works ;-) had a whitespace somewhere in the file :D
Would it be an option in the next s2member version? (it's easy to make it an variable and just let people select double opt-in or single opt-in.

Thanks,

~Luc

Re: Mailchimp and Confirm Subscription email

PostPosted: April 8th, 2011, 12:14 am
by Jason Caldwell
Thanks Luc. Yes, we have this on our TODO list. We'll probably add some Filters to these so it can be changed by adding an s2-hacks.php file to your /wp-content/mu-plugins/ directory. Later, we may add an option for this in the Dashboard. There are some additional plans to extend MailChimp in other ways.