Skip to content

Instantly share code, notes, and snippets.

@googya
Last active August 30, 2020 05:57
Show Gist options
  • Save googya/e52e4407536bb463a0ce9760e81ff885 to your computer and use it in GitHub Desktop.
Save googya/e52e4407536bb463a0ce9760e81ff885 to your computer and use it in GitHub Desktop.
code snippets

sending mail using sendcloud

response = RestClient.post "http://api.sendcloud.net/apiv2/mail/send", :attachments => File.new('all.sql','rb'),:apiUser => 'metalist',:apiKey => 'key',:from => "leslie_wen@qq.com",:fromName => "noname",:to => "leslie_wen@qq.com",:subject => "users assets",:html => 'users assets: attachments'
@googya
Copy link
Author

googya commented Aug 30, 2020

ruby bin/console

非常方便调试一些代码

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bundler/setup'
require_relative '../aws_email.rb'

begin
  require 'pry-byebug'
  binding.pry
rescue LoadError
  require 'irb'
  binding.irb
end

puts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment