I run a script nightly which used to send e-mails when it successfully
completed, but it no longer does. I’m not sure which configurations I
need to check as I haven’t used net/smtp much (I inherited this script).
Any ideas?
irb(main):001:0> require ‘net/smtp’
=> true
irb(main):002:0> supplierid = 8
=> 8
irb(main):003:0> body = “Subject: Product Import succeeded for
supplier #{supplierid} at #{Time.now.to_s}\r\n\r\n”
=> “Subject: Product Import succeeded for supplier 8 at Wed Sep 05
09:25:26 -0600 2007\r\n\r\n”
irb(main):004:0> Net::SMTP.start(mail_server, 25, helo_domain,
username, password, :login) do |smtp|
irb(main):005:1* smtp.send_message(body, from_address,
to_address)
irb(main):006:1> end
=> “250 Ok: queued as 20F73116D1AA\n”
…but the mail never arrives. Thanks for any assistance!
-----Original Message-----
From: Matt W. [mailto:[email protected]]
Sent: Wednesday, September 05, 2007 5:39 PM
To: ruby-talk ML
Subject: Trouble Sending Emails
=> “250 Ok: queued as 20F73116D1AA\n”
…but the mail never arrives. Thanks for any assistance!
Have you checked the mail server for the message ID it is supposedly
queued
as? And what doe the logs of the script and/or mail server say in regard
to
the messages?
If the mails are sent to a special account, can this account be checked
by a
mail client?
Have you checked the mail server for the message ID it is supposedly queued
as? And what doe the logs of the script and/or mail server say in regard to
the messages?
If the mails are sent to a special account, can this account be checked by a
mail client?
And it could be running afoul of whatever anti-spam measures might
exist between the source and recipient.
succeeded for supplier #{supplierid} at #{Time.now.to_s}\r\n\r\n"
=> "Subject: Product Import succeeded for supplier 8 at Wed
Sep 05 09:25:26 -0600 2007\r\n\r\n"
irb(main):004:0> Net::SMTP.start(mail_server, 25,
helo_domain, username, password, :login) do |smtp|
irb(main):005:1* smtp.send_message(body,
from_address, to_address)
irb(main):006:1> end
=> “250 Ok: queued as 20F73116D1AA\n”
at this point
a. the server mail_server received your email (w ack 250 Ok)
b. and further replied that it queued your mail w queueid 20F73116D1AA
(surely that reply and the queueid did not come fr ruby, right?)
ergo your ruby script is fine.
…but the mail never arrives. Thanks for any assistance!
it arrived on mail_server.
your mail admin can better help you.
kind regards -botp
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.