Skip to content

Instantly share code, notes, and snippets.

Created Jul 21, 2017
What would you like to do?
#!/usr/bin/env ruby
require 'rubygems'
require 'rest_client'
def send_mail
response = "",
:apiUser => 'ahelp17cow_test_rSoOwt', # 使用api_user和api_key进行验证
:apiKey => '',
:from => "", # 发信人,用正确邮件地址替代
:fromName => "SendCloud",
:to => "", # 收件人地址,用正确邮件地址替代,多个地址用';'分隔
:subject => "SendCloud ruby webapi common example",
:html => '欢迎使用SendCloud'
return response
response = send_mail
puts response.code
puts response.to_str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment