ruby用 3行代码发送 gmail
- 作者: 丢啊丢啊丢手绢
- 来源: 51数据库
- 2022-08-12
g = GmailSender.new('xxxxx@gmail.com', 'password')
#next unless File.exist? fn
#g.attach(fn) # you can attach any number of files, but there are limits for total attachments size
ti = now.strftime("%y-%m-%d")
p g.send(:to => t, :subject => ti, :content => File.read(fn))
推荐阅读
