Sha256: 399ec5e97169e60df3f06609c6e52610c7fe35fef0cb5c9a01e7f8e46d0facfc
Contents?: true
Size: 565 Bytes
Versions: 2
Compression:
Stored size: 565 Bytes
Contents
# -*- coding: utf-8 -*- require 'rubygems' # utwórz wiadomość require 'mail' mail = Mail.new do from 'wbzyl@inf.ug.edu.pl' to 'matwb@ug.edu.pl' content_type 'text/plain; charset=UTF-8' content_transfer_encoding '8bit' mime_version '1.0' subject 'This is a test email: #100' body File.read('body.txt') end puts mail.to_s # wyślij ją require 'net/smtp' login = 'wbzyl' password = 'alamakota' Net::SMTP.start('inf.ug.edu.pl', 25, 'inf.ug.edu.pl', login, password, :login) do |smtp| smtp.send_message mail.to_s, mail.from, mail.to end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nosql-tutorial-0.1.1 | lib/public/doc/mail/mail-00.rb |
nosql-tutorial-0.1.0 | lib/public/doc/mail/mail-00.rb |