Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re:x2 Sending SMTP mail on other than port 25

by grinder (Bishop)
on Apr 26, 2002 at 12:51 UTC ( #162261=note: print w/replies, xml ) Need Help??


in reply to Re: Sending SMTP mail on other than port 25
in thread Sending SMTP mail on other than port 25

ok, so I have the solution and I'm pleased to say that it works. Next time I'll try to remember to RTFS.

It makes me think, though, that the interface is slightly broken. To construct an object of the class correctly, it needs to pass a named attribute X to a base class. You can't, however, pass the X attribute to the new() method directly, only X2 is allowed.

I read the Net::SMTP pod, and no mention is made of the Port attribute (which is sort of to be expected). So from there I followed the chain of pod to Net::Cmd, IO::Handle, IO::Socket and IO::Socket::INET, which is where I finally found a mention a mention of PeerPort. In the first instance I was using Peer_Port, which didn't work, so when I came across this, I was sure it would work.

So what really needs to happen is the line PeerPort => $arg{Port} || 'smtp(25)',

...needs to be written as...

PeerPort => $arg{PeerPort} || $arg{Port} || 'smtp(25)',

and that way it will work regardless. I'll see what gbarr think about this :)


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://162261]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-06-22 01:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (100 votes). Check out past polls.

    Notices?