Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Issues with UTF-8 encoding in emails #19
Reading the source and the CampaignMonitor documentation it's quite clear that it accepts UTF-8 encoded data. However, the following script does not work with
#encoding=utf-8 require 'createsend' CreateSend.api_key '<snip>' puts CreateSend::VERSION CreateSend::Subscriber.add('<snip>', "jøsses@bådbasæn.dk", "Tester", , false)
1.1.1 /Users/sirup/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/createsend-1.1.1/lib/createsend.rb:141:in `handle_response': The CreateSend API responded with the following error - 1: Please provide a valid email address. (CreateSend::BadRequest) from /Users/sirup/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/createsend-1.1.1/lib/createsend.rb:134:in `post' from /Users/sirup/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/createsend-1.1.1/lib/createsend/subscriber.rb:30:in `add' from hej.rb:7:in `<main>'
It works fine with special characters in the name. I wrote to CampaignMonitor support as well to ask finally if they accept special characters in email (as they should).