Mailchimp API for Rails-list.subscribe(:double_optin => false)不起作用 [英] Mailchimp API for Rails - list.subscribe(:double_optin => false) not working

查看:100
本文介绍了Mailchimp API for Rails-list.subscribe(:double_optin => false)不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用mailchimp-api gem,可以通过提交电子邮件并向发送给该电子邮件的确认电子邮件(已签名)发送确认电子邮件,但是我想禁用double_optin标志.我正在尝试这样做:

I am using the mailchimp-api gem and can get the submitted email to work by submitting an email and having a confirmation email sent to that email that signed up but I want to disable the double_optin flag. I am trying to do it with:

@mc = Mailchimp::API.new('my api key here')
@mc.list.subscribe('list_id', {'email' => params[:email]}, :double_optin => false)

这仍在向该电子邮件地址发送确认电子邮件.

This is still sending a confirmation email to that email address.

我真的不喜欢它如何重定向到mailchimp页面,以使您确认订阅并必须单击另一个按钮才能重定向到该站点.如果您可以自定义确认电子邮件,那将是一回事,但是拥有此通用确认页面会很糟糕.

I really don't like how it redirects to a mailchimp page to have you confirm your subscription and have to click another button to be redirected to the site. If you could customize the confirmation email that would be one thing but having this generic confirmation page is terrible.

我想知道您是否需要一个付费帐户才能切换:double_optin标志?

I am wondering if you have to have a paid account to be able to toggle the :double_optin flag?

推荐答案

最终使它可与以下各项一起使用:

Ended up getting this to work with the following:

@mc = Mailchimp::API.new('my api key here')
@mc.list.subscribe({:id => 'list_id', :email => {:email => params[:email]}, :double_optin => false})

请注意,这里的区别在于@mc.list.subscribe中的每个参数都在哈希中.

Note the difference here is that every parameter in @mc.list.subscribe is in a hash.

这篇关于Mailchimp API for Rails-list.subscribe(:double_optin => false)不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆