What is wrong in my script?
- From: Ivan Vieira <ivan.vieira@xxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 06:48:36 +0900
require 'net/smtp'
def send_email(from, from_alias, to, to_alias, subject, message)
msg = <<END_OF_MESSAGE
From: #{from_alias} <#{from}>
To: #{to_alias} <#{to}>
Subject: #{subject}
#{message}
END_OF_MESSAGE
Net::SMTP.start("smpt.server", 25) do |smtp|
smtp.send_mail msg, from, to
end
end
send_email("from", "from_alias", "to", "to_alias", "subject", "message")
--
Posted via http://www.ruby-forum.com/.
.
- Follow-Ups:
- Re: What is wrong in my script?
- From: Phillip Gawlowski
- Re: What is wrong in my script?
- Prev by Date: Re: simple gsub question \' \` what?
- Next by Date: Re: What is wrong in my script?
- Previous by thread: simple gsub question \' \` what?
- Next by thread: Re: What is wrong in my script?
- Index(es):