[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-mailbox
Subject:    RE: retrieving error messages in case of delivery failure via->'smtp'
From:       "Edward Wildgoose" <Edward.Wildgoose () FRMHedge ! com>
Date:       2002-10-07 7:49:49
[Download RAW message or body]

Nope, no more control needed.  It came down to the fact that I spent about 3 weeks \
trying to write a little program which picked up emails from a queue directory and \
then sent them via SMTP to a known SMTP host (SMS pager pickup point).  In the end I \
wrote the whole thing myself in an afternoon by stealing the best bits from \
Mail::Box, but assembling the pieces myself

I forget the exact problems, but it was stuff such as an unreliability to get hold of \
messages which weren't numbered from 1 I think?  Plus SMTP send, main problems I \
think were that you couldn't tell if the error was a timeout on connection (hence \
retry), or a "4xx over quota" error code after "MAIL FROM" sent, hence wait 5 mins \
before retrying.  Also, it turned out to be useful to be able to have different \
"recipients" to what was in the "TO" line of the email (sounds dodgy, but basically \
because some people in the TO line should be sent to one SMTP gateway, and the \
message might also be CC'd to another user on a different SMTP server.  You get a \
relaying error if you try and push the whole message to the SMS gateway with orig TO \
line as the recipients)

The ideas we discussed were very helpful in the end though.  I am happy to send you \
the code so that you can see what is happening, and consider adding any parts to \
Mail::Box?

Thanks for all your help

Ed W

-----Original Message-----
From: Mark Overmeer [mailto:mailbox@perl.overmeer.net]
Sent: 07 October 2002 07:30
To: Edward Wildgoose
Cc: Mail-Box Mailinglist
Subject: Re: retrieving error messages in case of delivery failure
via->'smtp'


* Edward Wildgoose (Edward.Wildgoose@FRMHedge.com) [021007 08:19]:
> That is a feature request that I have also asked for.  Search back for some
> messages from me (can't remember what the subject was....  About 4-5 months
> ago I think.

As the docs state: trySend() is list context returns

 (success, error code, error text, error location, quit success)

Su:

 my $stmp = Mail::Transport::SMTP->new(hostname => ...);

 my ($success, $errcode, $errtxt, $errloc, $quit) = $smtp->trySend($msg);
 if($success) ...

> In the end I used my own send function,

Hum... so we added a lot to the sending for you, and you do not use
it yourself :(  Is there a reason why?  Maybe you need more control
over the protocol and not only error codes...
-- 
               MarkOv       %-]


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic