我有一个rails 4.2应用程序,通过MailChimp使用Gibbon gem进行简报注册。 这是我的初始化程序: Gibbon::Request.api_key = ENV[‘MAILCHIMP_API_KEY’] Gibbon::Request.timeout = 15 Gibbon::Request.throws_exceptions = false 以下是user.rb中的相关方法: # returns the mailchimp member if one exists for @user.email def mailchimp_user gb = Gibbon::Request.new(api_key: ENV[‘MAILCHIMP_API_KEY’]) gb.lists(ENV[‘MAILCHIMP_LIST_ID’]).members(Digest::MD5.hexdigest(“#{self.email.downcase}”)).retrieve rescue Gibbon::MailChimpError => e return nil, :flash => { error: e.message } end def mailchimp_member_id if self.mailchimp_user.kind_of?(Array) return nil elsif self.mailchimp_user.kind_of?(Hash) self.mailchimp_user[“id”] end end […]
我正在使用mailchimp-api gem并且可以通过提交电子邮件并将确认电子邮件发送到已注册的电子邮件来获取提交的电子邮件,但我想禁用double_optin标志。 我试图这样做: @mc = Mailchimp::API.new(‘my api key here’) @mc.list.subscribe(‘list_id’, {’email’ => params[:email]}, :double_optin => false) 这仍然是向该电子邮件地址发送确认电子邮件。 我真的不喜欢它如何重定向到mailchimp页面以确认您的订阅,并且必须单击另一个按钮才能重定向到该站点。 如果您可以自定义确认电子邮件,但这个通用确认页面很糟糕。 我想知道你是否必须有一个付费帐户才能切换:double_optin标志?
双重选择确认电子邮件仍然通过,任何想法有什么问题? 长臂猿gem有问题,所以选择了mailchimpgem。 的Gemfile gem “mailchimp-api”, “~> 2.0.4” application_controller.rb class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception before_action :setup_mcapi def setup_mcapi @mc = Mailchimp::API.new('mailchimp api key goes here') @list_id = "list id goes here" end end welcome_controller.rb class WelcomeController […]
我正在尝试将长臂猿gem添加到Rails 3.2应用程序中。 我按照说明操作,并使用以下内容设置了一个gibbon.rb初始化程序 Gibbon::API.api_key = ENV[“MAILCHIMP_API_KEY”] Gibbon::API.timeout = 15 Gibbon::API.throws_exceptions = false 该应用程序正在投掷 uninitialized constant Gibbon::API (NameError) 我试图在其他方面require ‘gibbon’ ,但似乎没有任何效果。 为什么class级没有初始化?
哪个是使用带有Rails的Mailchimp API的首选gem或插件? 这里有一个列表,但我还没有尝试任何: mailchimp ruby 任何反馈都表示赞赏! 谢谢!
选中此框后,如何在单击“保存”时将用户的电子邮件从“输入电子邮件”添加到我的mailchimp订阅者列表中? 用户/ new.html.erb Get blog posts from Anthony Galli, CEO & Founder about conquering challenges in life & business! 在注册过程之外,人们可以通过在subscribes / subscribe.html.erb中输入他们的电子邮件来订阅 。 (function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]=’EMAIL’;ftypes[0]=’email’;fnames[1]=’FNAME’;ftypes[1]=’text’;fnames[2]=’LNAME’;ftypes[2]=’text’;}(jQuery));var $mcj = jQuery.noConflict(true);
我在替换mc:edit遇到问题mc:edit使用我提供的内容mc:edit Mailchimp中的内容区域。 电子邮件将发送给订阅者,但所提供的内容都不会添加到电子邮件中。 谁能看到我可能会出错的地方? 这是我正在使用的脚本: campaign = mailchimp.campaigns.create( “regular”, { “list_id” => list_id, “subject” => “Email Test”, “from_email” => “edward@somewhere.com”, “from_name” => “Edward”, “to_name” => “The to name”, “template_id” => 35089 }, { “sections” => { “commit_stuff” => “Modified project to use XYZ ruby gem. #ABC-123”, “content” => “This is the content”, “more-content” => “This […]