[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Email errors

Dark Ambient

8/23/2006 12:12:00 PM

I'm working on this recipie from the Ruby Cookbook, but receiving
errors. Not sure if this is code related or system related. I'm
attempting to send mail via my ISP's smtp server.
To protect the innocent I took out the real names of domains , etc.

Errors:

:/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `initialize':
getaddrinfo: no address associated with hostname. (SocketError)
from C:/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
from C:/instantrails/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
from C:/instantrails/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
from C:/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start'
from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'
from C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:447:in
`perform_delivery_smtp' from
C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:333:in
`deliver!' from
C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:227:in
`method_missing' from C:/InstantRails/ruby_progs/simplemailer.rb:24

Program:

#!/usr/bin/env ruby

require 'rubygems'
require 'action_mailer'


class SimpleMailer < ActionMailer::Base
def simple_message(recipient)
from 'me@mydomain.com'
recipients recipient
subject 'A single-part message for you'
body 'This message has a plain text body'
end
end

ActionMailer::Base.server_settings = { :address => 'smtp.mydomain.com',
:port => 25,
:domain => 'mydomain.com',
:user_name => 'username@mydomain.com',
:password => 'password',
:authentiation => :login }


puts SimpleMailer.deliver_simple_message('myname@google.com')

6 Answers

Dark Ambient

8/23/2006 12:20:00 PM

0

I think I had an error in the address , now that's it's corrected I
get a new error:

`check_response': 504 CRAM-MD5 authentication mechanism not supported
(Net::SMTPSyntaxError)



On 8/23/06, Dark Ambient <sambient@gmail.com> wrote:
> I'm working on this recipie from the Ruby Cookbook, but receiving
> errors. Not sure if this is code related or system related. I'm
> attempting to send mail via my ISP's smtp server.
> To protect the innocent I took out the real names of domains , etc.
>
> Errors:
>
> :/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `initialize':
> getaddrinfo: no address associated with hostname. (SocketError)
> from C:/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
> from C:/instantrails/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
> from C:/instantrails/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
> from C:/instantrails/ruby/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
> from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
> from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start'
> from C:/instantrails/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start'
> from C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:447:in
> `perform_delivery_smtp' from
> C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:333:in
> `deliver!' from
> C:/instantrails/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.2.3/lib/action_mailer/base.rb:227:in
> `method_missing' from C:/InstantRails/ruby_progs/simplemailer.rb:24
>
> Program:
>
> #!/usr/bin/env ruby
>
> require 'rubygems'
> require 'action_mailer'
>
>
> class SimpleMailer < ActionMailer::Base
> def simple_message(recipient)
> from 'me@mydomain.com'
> recipients recipient
> subject 'A single-part message for you'
> body 'This message has a plain text body'
> end
> end
>
> ActionMailer::Base.server_settings = { :address => 'smtp.mydomain.com',
> :port => 25,
> :domain => 'mydomain.com',
> :user_name => 'username@mydomain.com',
> :password => 'password',
> :authentiation => :login }
>
>
> puts SimpleMailer.deliver_simple_message('myname@google.com')
>
>

ts

8/23/2006 12:30:00 PM

0

>>>>> "D" == Dark Ambient <sambient@gmail.com> writes:

D> `check_response': 504 CRAM-MD5 authentication mechanism not supported
D> (Net::SMTPSyntaxError)

Net::SMTP use CRAM-MD5 if an user is given and no authentification
mechamnism is given

>> :authentiation => :login }
^^^^^^^^^^^^^^

strange english word :-)


Guy Decoux

Dark Ambient

8/23/2006 12:46:00 PM

0

I thought typos were one of the syntactic sugars of Ruby.
:)

Stuart

On 8/23/06, ts <decoux@moulon.inra.fr> wrote:
> >>>>> "D" == Dark Ambient <sambient@gmail.com> writes:
>
> D> `check_response': 504 CRAM-MD5 authentication mechanism not supported
> D> (Net::SMTPSyntaxError)
>
> Net::SMTP use CRAM-MD5 if an user is given and no authentification
> mechamnism is given
>
> >> :authentiation => :login }
> ^^^^^^^^^^^^^^
>
> strange english word :-)
>
>
> Guy Decoux
>
>

Francis Cianfrocca

8/23/2006 2:51:00 PM

0

On 8/23/06, Dark Ambient <sambient@gmail.com> wrote:
> I thought typos were one of the syntactic sugars of Ruby.


More like syntactic chili powder ;-)

jwalker

3/30/2013 5:37:00 PM

0

Kirby Grant wrote:

>
> On 29-Mar-2013, "Lee L. Curtis" <cleetis@gmail.com> expressed a
> parochial opiion:
>
> > Kirby Grant wrote:
> >
> > >
> > > On 29-Mar-2013, "Slackjaw" <Captain@OklahomaSpaceAlliance.com>
> > > expressed a parochial opiion:
> > >
> > > > Kirby Grant wrote:
> > > >
> > > > >
> > > > > On 28-Mar-2013, "Slackjaw" <Captain@OklahomaSpaceAlliance.com>
> > > > > expressed a parochial opiion:
> > > > >
> > > > -
> > > > > > > So as long as you Republicans/conservatives keep
> > > > > > > acting dumb I will need to talk in terms as simple as
> > > > > > > possible because you have proven that you cannot
> > > > > > > understand more complex arguments.
> > > > > >
> > > > > > Hey Kirby, why don't you start posting at your own
> > > > > > intellectual level for a while? I'm curious to see what a
> > > > > > post from someone as smart as Einstein would look like.
> > > > > >
> > > > >
> > > > > But then it would be beyond your capability to understand. I
> > > > > write in a manner that makes it clear that I am insulting you
> > > > > and your other blithering idiot friends.
> > > >
> > > > No, seriously, go ahead. I'd like to see you post something I
> > > > couldn't understand.
> > > >
> > > >
> > >
> > > I am god.
> >
> > Well, I can understand it: you're nuts.
> > >
>
> No. I am not. But it does show that you simply have no capacity to
> understand things that occur at a higher level than your gutter-based
> thinking.

Perhaps you can provide some proof of your statement that you are god,
like a large Swiss bank account in my name.


>
> > >
> > > See? I told you that you wouldn't be able to understand. There is
> > > no falsehood in that statement but it is far beyond your ability
> > > to understand the meaning of that statement.
> >
> > You rightards don't get how profoundly stupid you all are.
> >
> > --
>
> No one would ever accuse me of being on the right. Pick the most
> liberal person that you know and that person would be far to the
> right of me. I make people like Jesse Jackson, John Kerry and Nancy
> Pelosi look like conservative wing-nuts in comparison to me.



--
*

Lee L. Curtis

3/30/2013 8:50:00 PM

0

Kirby Grant wrote:

>
> On 29-Mar-2013, "Lee L. Curtis"
> <cleetis@gmail.com>.alt.fan.rush-limbaugh regurgitated:
> Re: Here's more Truth of America's founding on moral bedrock
>
> > Kirby Grant wrote:
> >
> > >
> > > On 29-Mar-2013, Obama's Legion of Flash Mobs @ 7/11.nig expressed
> > > a parochial opiion:
> > >
> > > > On Fri, 29 Mar 2013 13:07:41 GMT, "Kirby Grant"
> > > > <KGrant@gmail.com> wrote:
> > > >
> > > > >
> > > > > On 28-Mar-2013, "Slackjaw" <Captain@OklahomaSpaceAlliance.com>
> > > > expressed
> > > > > a
> > > > > parochial opiion:
> > > > >
> > > > >> Kirby Grant wrote:
> > > > > >
> > > > >> >
> > > > >> > On 28-Mar-2013, Salty Stan <wsjames123@gmail.com>
> > > > expressed a >> > parochial opiion:
> > > > >> >
> > > > >> > > On Mar 28, 11:22 am, Obama's Legion of Flash Mobs @
> > > > 7/11.nig wrote: >> > > > On Wed, 27 Mar 2013 03:34:00 GMT,
> > > > "Kirby Grant" >> > > <KGr...@gmail.com>
> > > > >> > > > wrote:
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > > On 26-Mar-2013, expressed a parochial opiion:
> > > > >> > > >
> > > > >> > > > >> > > You do know the difference between knowledge and
> > > > >> > > > intelligence?
> > > > >> > > >
> > > > >> > > > >> > Intelligence is actually just a cheap parlor
> > > > trick. >> > > >
> > > > >> > > > >> Indeed?! Sounds like sour grapes to me. It is easy
> > > > to >> > > > disparage that >> which we don't have.
> > > > >> > > >
> > > > >> > > > > Why is it that I am so good at making Republicans
> > > > look like >> > > > > stupid idiots.
> > > > >> > > > > It must be a gift - either that or it is extremely
> > > > low-hanging >> > > > > fruit.
> > > > >> > > >
> > > > >> > > > > I have typically placed in the upper 2% of every
> > > > intelligence >> > > > > test that has
> > > > >> > > > > ever been given to me. Early in my life my teachers
> > > > were >> > > > > frustrated at me
> > > > >> > > > > because I never performed at the level they know I
> > > > was capable >> > > > > of. But there
> > > > >> > > > > was little they could do about it. In college they
> > > > would have >> > > > > fast tracked
> > > > >> > > > > me to tenured professor if only I would have stayed
> > > > on and >> > > > > pursued doctoral
> > > > >> > > > > studies but I chose to pursue a technical career
> > > > instead of >> > > > > academia. For
> > > > >> > > > > you to accuse me of not having intelligence is for
> > > > you to show >> > > > > just how much
> > > > >> > > > > you really don't have at all and demonstrates your
> > > > abject >> > > > > ignorance about
> > > > >> > > > > what it means to be intelligent in the first place.
> > > > >> > >
> > > > >> > > Not to dispute your claim that you "beat" all these
> > > > intelligence >> > > tests (how many were there, again?) but if
> > > > you were really in the >> > > top 2% of the bell curve, why do
> > > > you post the way you do? >> > >
> > > > >> >
> > > > >> > First of all I have to dumb down the message because it is
> > > > directed >> > at
> > > > >> > Republicans. Until and unless Republicans start becoming
> > > > smarter and >> > actually use their brains to think, more
> > > > sophisticated messages are a >> > waste of time. Republicans
> > > > have proven that they are not capable of >> > phrasing any
> > > > issue except in ways that are handed to them by the >> >
> > > > talking heards of the RNC and other conservative spokesmen. If
> > > > those >> > sources insisted that the ocean is yellow,
> > > > conservatives would start >> > posting a string of message
> > > > telling everyone that the ocean is yellow >> > and that it
> > > > cannot be disputed. This is EXACTLY what they are doing >> >
> > > > with the gun control discussion. This is EXACTLY what they are
> > > > doing >> > with the gay marriage issue. This is EXACTLY what
> > > > they are doing with >> > the immigration issue. This is
> > > > EXACTLY how they are trying to perform >> > character
> > > > assassination of President Obama. If the talking heads had >> >
> > > > disavowed the "birther" discussion the day after it first came
> > > > out, >> > it never would have grown feet and walked. The
> > > > talking heads knew it >> > was a fallacious argument, but they
> > > > saw an advantage in getting >> > people to follow that totally
> > > > foolish path. So as long as you >> > Republicans/conservatives
> > > > keep acting dumb I will need to talk in >> > terms as simple as
> > > > possible because you have proven that you cannot >> >
> > > > understand more complex arguments.
> > > > > >
> > > > >> Hey Kirby, why don't you start posting at your own
> > > > intellectual level >> for a while? I'm curious to see what a
> > > > post from someone as smart as >> Einstein would look like.
> > > > > >
> > > > >
> > > > > But then it would be beyond your capability to understand. I
> > > > > write in a manner that makes it clear that I am insulting you
> > > > > and your other blithering
> > > > > idiot friends.
> > > >
> > > > I know about a dozen Liberal Arts' majors who wouldn't know how
> > > > to change a light bulb but sure know how to pick out fingernail
> > > > polish.
> > > >
> > > > I'm glad you were able to learn a skill which your boss rewards
> > > > you handsomely. Union thugs like Obama have to blackmail
> > > > employers with threats of strike or flash mob demonstrations to
> > > > get what's owed them through 'social justice'.
> > > >
> > > > What percent of Liberal Arts' degrees do you suppose the OWS/99%
> > > > habs and can't get a job because they've been taught advanced
> > > > basket weaving rather than real world skills?
> > >
> > > No. You really don't know people like that. You just made that up
> > > because you think you can get away with it. But since you cannot
> > > prove that you know such people you end up being an immoral,
> > > unethical liar - which is typical of conservatives.
> > >
> > > While I do have a liberal arts degree, I work in a technical
> > > profession. I'm a self-taught computer programmer. My liberal arts
> > > degree taught me how to learn. After that it was just a matter of
> > > applying the skill of learning to become a programmer. If other
> > > people don't use the skills they have to develop other skills,
> > > then that is their fault. I'm not accountable for them. I decided
> > > to be successful in a career and it turns out I am.
> > >
> > > Just two days ago I ended up being noticed by the upper levels of
> > > my company because there was a crisis with one of our customers
> > > and after everyone else who had been contacted said they didn't
> > > know how to fix the problem (it was with an older version of a
> > > program that we haven't actively supported in years) they finally
> > > came to me and I said I'd take care of it and in just a couple
> > > hours I had the program working again. All because I made the
> > > decision that I would take the chance on failing instead of
> > > saying I wouldn't even try. The VPs were pretty happy when I
> > > reported that the problem was solved. Of course this is nothing
> > > new for me - I've been doing things like this my whole career.
> > > I'm always the last person they turn to because there is no need
> > > for anyone else to get involved once they pass a problem to me.
> > > That has keep me very employable over the years. All with a
> > > liberal arts degree.
> >
> > It took you hours to solve that problem? That's pathetic, I solve
> > issues like that in minutes!
> >
> > Of course, unlike you, I was smart enough to get a degree in
> > Information and Computer Science. Whatever company you work for
> > must be desperate if it has to hire liberal art majors to do its
> > technical work. Only the super-intelligent can do the job I do,
> > that's why I can demand and get the big bucks.
> >
> > --
>
> You phony. I never described the exact problem. You would have been
> at an utter loss to fix the problem because you've never seen a
> program quite like the one I fixed. On top of that, I am the person
> who was hired by my company, not you. That means they value my
> services far more than they do yours.

I doubt they could afford me. If they are reduced to hiring liberal
arts majors instead of real developers then they must not be able to
afford much.

> I doubt they would even look at
> your resume. In my business unit over 90% of us are over the age of
> 40. Over 50% over us are above the age of 50.

OMG- what is the company, the old geezer's club? How can you develop
software? Do you push the mouse with your walker?

> We don't have junior
> people because we cannot afford to carry them while they learn the
> business. If we hire someone it is because they got all of their
> experience elsewhere and were qualified the day they walk through the
> door. I happened to get hired originally because they needed someone
> who was a database guru, an experienced assembler/3GL programmer and
> a unix/windows system administrator all rolled into one and they also
> liked my mainframe background because they weren't sure at the time
> whether they might need that.
>
> I am Phi Beta Kappa as well as being a Viet Nam veteran.

Whoa, what are you, like 70 years old!? What did you learn to program
on, an UNIVAC? No wonder it takes you hours to solve a software problem.

The IT world had advanced light-years since programming in machine
code. We're in the 21st century now, we left you old-timers in the dust
years ago.

> I also have a
> resume that left average behind a long time ago. There are other
> factors that you are neither qualified or authorized to know.
>
> You people with IT degrees are basicly uneducated automatons.

Since you aren't smart enough to have an IT degree, you really wouldn't
know. We young guns have all the latest technology. You need to stand
aside grandpa, and let us pass; we're streaming ahead at warp speed. We
can't wait for some old has-been hippie who takes 20 seconds a
keystroke due to his arthritis. Sorry to be blunt, but you're still
stuck in the 20th century, we're young and strong, and that's life.

> You
> can't provide oral presentations, you are incapable of writing decent
> documentation, you don't have a broad knowledge base, you are
> completely uncultured.

If you consider getting stoned, having flower children, and going to
Woodstock as being "cultured" then you've got a point. But I was
learning leading edge computer technology at the same age that you were
smoking pot and having "love-ins".

> Basically you got career training, not an
> education. The majority of presidents of the United States have had
> liberal arts degrees - not a one of them had a degree in either IT or
> MIS.

Really? Prove it.

--