D
Dirk Einecke
Hi.
I've this code:
--------------------------------
#!/usr/bin/ruby
require 'net/smtp'
msg = <<END_OF_MESSAGE
From: Dirk-From <[email protected]>
To: Dirk-To <[email protected]>
Subject: ruby test mail
Date: #{Time.now.strftime("%a, %d %b %Y %H:%M:%S %z %Z")}
Message-Id: <#{"%.8f" % Time.now.to_f}@we-devedge.de>
test text
END_OF_MESSAGE
Net::SMTP.start(server = 'pop3.we-devedge.de', port = 25) {
|smtp|smtp.sendmail(msg, '(e-mail address removed)', '(e-mail address removed)') }
--------------------------------
But I get a error 500
from /usr/lib/ruby/1.6/net/protocol.rb:164:in `conn_command'
from /usr/lib/ruby/1.6/net/smtp.rb:238:in `do_start'
from /usr/lib/ruby/1.6/net/protocol.rb:131:in `start'
from /usr/lib/ruby/1.6/net/protocol.rb:71:in `start'
from mail.rb:15
[Sat Feb 7 23:54:11 2004] [error] [client 80.139.26.35] Premature end
of script headers: /kunden/we-devedge.de/ruby/htdocs/mail.rb
Can anybody help me with this problem?
What can I do?
bye
Dirk Einecke
I've this code:
--------------------------------
#!/usr/bin/ruby
require 'net/smtp'
msg = <<END_OF_MESSAGE
From: Dirk-From <[email protected]>
To: Dirk-To <[email protected]>
Subject: ruby test mail
Date: #{Time.now.strftime("%a, %d %b %Y %H:%M:%S %z %Z")}
Message-Id: <#{"%.8f" % Time.now.to_f}@we-devedge.de>
test text
END_OF_MESSAGE
Net::SMTP.start(server = 'pop3.we-devedge.de', port = 25) {
|smtp|smtp.sendmail(msg, '(e-mail address removed)', '(e-mail address removed)') }
--------------------------------
But I get a error 500
from /usr/lib/ruby/1.6/net/protocol.rb:164:in `conn_command'
from /usr/lib/ruby/1.6/net/smtp.rb:238:in `do_start'
from /usr/lib/ruby/1.6/net/protocol.rb:131:in `start'
from /usr/lib/ruby/1.6/net/protocol.rb:71:in `start'
from mail.rb:15
[Sat Feb 7 23:54:11 2004] [error] [client 80.139.26.35] Premature end
of script headers: /kunden/we-devedge.de/ruby/htdocs/mail.rb
Can anybody help me with this problem?
What can I do?
bye
Dirk Einecke