Trouble Sending Emails

Hello,

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!

Matt

  ____________________________________________________________________________________

Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.

-----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?

On 9/5/07, Phil [email protected] wrote:

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.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

On Sep 5, 10:03 pm, Peña, Botp [email protected] wrote:

=> “250 Ok: queued as 20F73116D1AA\n”

it arrived on mail_server.

your mail admin can better help you.

kind regards -botp

Thanks for the help. I will have the server admin look into it for me.

From: Matt W. [mailto:[email protected]]

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”

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.

| Privacy Policy | Terms of Service | Remote Ruby Jobs