Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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' In reply to Re:x2 Sending SMTP mail on other than port 25
by grinder
|
|