> From: "Dan Muey" <[EMAIL PROTECTED]> > > Here's wht I have: > > $r .= "Sending..."; > > eval { > > my $senderx = new Mail::Sender {smtp => $smtp, from => $from }; > > You forgot to tell Mail::Sender to die in case of an error :-)
Oohhhhhhh, yeah :) Thanks > > > $senderx->Open({subject => $subj, to => $to }); > > $senderx->SendLineEnc($msg); $senderx->Close(); > > }; > > if($@) { $r .= "Error sending mail: $@ -- > $Mail::Sender::Error <br /> > > \n"; } else { $r .= "Done <br /> \n"; } > > > > The issue I'm seeing is this: > > > > If $to is a local address on $smtp (IE the same server this > scirpt is > > on) It sends no problem regardless of where $from 's server is at. > > > > If I set $to to an address on the other server and $from to a local > > address(or anythgin) it won't go. > > I bet the server is set up to disallow "relay". So either the sender > or the adressee has to be local. Or you have to authenticate. One of them is always local I'll try the authentication bit again. > > > The thing is I get "Sending...Done" everytime but never a > dleivery and > > no hinf tof it in the logs. On one server I needed to use smtp > > authentication but that set $@ and said connection couldn't be made. > > > > Any ideas what I'm missing would be awesome! > > By default Mail::Sender does not raise exceptions. It returns > negative error codes. > Right on! I'll take a look at your cpan page again and redo my problem handling angle. As usual you rock! > Jenda -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>