Sha256: 39c3835a9eab923877c6de692d7d8d4e200efae8441f81f3ff2a4f3f135e1fd4

Contents?: true

Size: 980 Bytes

Versions: 2

Compression:

Stored size: 980 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'net/smtp'

module GGSM
  module Email
    def send_email(user,title,msg)
      message = <<END_OF_MESSAGE
From: GGSM Merge Request <18019913184@163.com>
To: 王右右 <wangyouyou@souche.com>,王锡臣 <wangxichen@souche.com>,沈若川 <shenruochuan@souche.com>,洪晨 <hongchen@souche.com>,朱瑞雪 <zhuruixue@souche.com>,朱久言 <zhujiuyan@souche.com>
Subject: [#{user}] #{title}

#{msg}
END_OF_MESSAGE

      Net::SMTP.start('smtp.163.com', 25, 'YoKey',
                      '18019913184@163.com', 'able180896919') do |smtp|
        smtp.send_message message,
                          '18019913184@163.com',
                          'wangyouyou@souche.com',
                          'wangxichen@souche.com',
                          'shenruochuan@souche.com',
                          'hongchen@souche.com',
                          'zhuruixue@souche.com',
                          'zhujiuyan@souche.com'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ggsm-1.9.5 lib/ggsm/mr/email.rb
ggsm-1.9.4 lib/ggsm/mr/email.rb