Sailthru-client gem

51 views
Skip to first unread message

Mlle

unread,
Apr 5, 2011, 11:56:56 AM4/5/11
to Ruby on Rails: Talk
Hi,

I'm trying to set up Sailthru but get this error when I try to use it
(get_email method):

Sailthru::SailthruClientException: Unable to open stream:
https://api.sailthru.com/email?format=json&api_key=....etc

Mlle

unread,
Apr 5, 2011, 12:01:46 PM4/5/11
to Ruby on Rails: Talk
I'm running the app locally, so do I have to do anything in particular
to open an external stream?

Colin Law

unread,
Apr 5, 2011, 12:07:56 PM4/5/11
to rubyonra...@googlegroups.com

Does the url open if you enter it into your browser?

Colin

Mlle

unread,
Apr 5, 2011, 12:11:50 PM4/5/11
to Ruby on Rails: Talk
Yes

On Apr 5, 12:07 pm, Colin Law <clan...@googlemail.com> wrote:

Colin Law

unread,
Apr 5, 2011, 12:16:57 PM4/5/11
to rubyonra...@googlegroups.com
On 5 April 2011 17:11, Mlle <emst...@gmail.com> wrote:
> Yes

Sorry that was my one an only (and useless) idea.

Colin

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

Mlle

unread,
Apr 5, 2011, 12:22:43 PM4/5/11
to Ruby on Rails: Talk
Hmm, do you think it could have anything to do with SSL?

On Apr 5, 12:16 pm, Colin Law <clan...@googlemail.com> wrote:

Mlle

unread,
Apr 5, 2011, 12:33:18 PM4/5/11
to Ruby on Rails: Talk
if I use this code and manually insert the uri that the
sailthru.get_email method is generating is comes back with a response.

require "net/https"
require "uri"

uri = URI.parse("https://secure.com/")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(uri.request_uri)

response = http.request(request)
response.body
response.status
response["header-here"] # All headers are lowercase

Bryan Crossland

unread,
Apr 5, 2011, 1:47:52 PM4/5/11
to rubyonra...@googlegroups.com

Please post the full error you are getting. Since you can open this link via browser and net/http library there is something else going on and no one can tell what it is from this truncated error message.

B.

priyajit nayak

unread,
Apr 28, 2015, 7:05:04 AM4/28/15
to rubyonra...@googlegroups.com, emst...@gmail.com
how to send multiple email in sailthru...........please anyone help me
Reply all
Reply to author
Forward
0 new messages