Re: What is wrong in my script?



On 3/30/07, Phillip Gawlowski <cmdjackryan@xxxxxxxxxxxxxx> wrote:
Ivan Vieira wrote:
> 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")
>

These are wild guess, due to the lack of error messages:
- No authentication provided to the mail server
- The RCPT email doesn't exist
- No HELO provided
- No SMTP server available at the address
- No network connection
- Wrong port

And "from", "from_alias", "to", and "to_alias" don't look like valid
e-mail addresses.

Now can someone please tell me the winning numbers in the next big
powerball lottery?

--
Rick DeNatale

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

.



Relevant Pages

  • Re: Need Help Using Net::SMTP
    ... On Thursday 29 December 2005 06:59 pm, Dan Diebolt wrote: ... The "250 Mail queued for delivery.\n" message is from the mail server. ... > script using net/smtp: ... > After trying the above ruby in irb I get the following message with no ...
    (comp.lang.ruby)
  • Re: email questions...
    ... > this was when I tried to send a message to my email account with my ISP. ... > I was able to send msg to a hotmail account. ... > outbound messages (from the email agent like mozilla to the mail server). ...
    (Debian-User)
  • Re: What is wrong in my script?
    ... smtp.send_mail msg, from, to ... - No authentication provided to the mail server ... Rule of Open-Source Programming #8: ...
    (comp.lang.ruby)