- 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))
- #该片段来自于http://www.codesnippet.cn/detail/110420132812.html
来源: http://www.codesnippet.cn/detail/110420132812.html