Hi Justin,

Yes I understand about mail queuing, however:

1. This is a local mail server with no queue (and the logs report 0.00
seconds to queue)
2. The system works without a problem when I use CURL
3. The mail server's logs show that the command to send the message are
being received by the server after the commands to view the mail
4. Delaying the checking of the email by up to 10 seconds does not change
any of this

Cheers,
Steven

-----Original Message-----
From: Justin Randell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 12 March 2008 11:57 AM
To: Steven Brown
Cc: 'Bill Karwin'; [email protected]
Subject: Re: [fw-general] Zend_Mail SMTP Threading?

Steven Brown wrote:
> 
> It appears as though the local server waits for the SMTP commands to
finish
> before it returns a result to CURL, whereas directly accessing my
bootstrap
> allows the SMTP commands to run in the background almost as a separate
> thread.

i doubt there are any separate threads here. the basic issue is that 
smtp commands finishing != message delivered to intended recipients 
mailbox.

usually, smtp commands finishing in php code just means the mail server 
has accepted the message into its queue. so:

time a: smtp commands finish in php code
time a + n: pop commands run
time a + N: message gets to user mailbox

if n is greater than N, then your tests will run ok. if not, then they wont.

N is not dependent on your scripts or tests, but on an external process 
- the mail server.

so, the simplest thing to do is to make n larger by putting a sleep call 
in before you run the pop checks.

another less simple approach is to use mock objects to represents the 
mail process.

make sense?

> Cheers,
> Steven

cheers
justin



Reply via email to