Hey, I’m still learning ruby (first week) and I’m having problem with a
script that sends an e-mail.
The script (~/teste_email.rb) runs fine when I call it, but raises and
exception when ran as a cron task.
This is the stack trace:
write': Broken pipe (Errno::EPIPE) from /usr/lib/ruby/1.8/net/protocol.rb:139:in<<’
rbuf_consume' from /usr/lib/ruby/1.8/net/protocol.rb:118:inreaduntil’
readline' from /usr/lib/ruby/1.8/net/smtp.rb:664:inrecv_response’
send0' from /usr/lib/ruby/1.8/net/smtp.rb:686:incritical’
send0' ... 7 levels... from /var/lib/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:414:indeliver’
send_gmail' from /home/otto/teste_mail.rb:5:inenvia_email’
I got send_gmail.rb from this website:
Why does it run fine when I call it myself and how do I make it run ok
Thanks in advance