In my bootstrap: Zend_Mail::setDefaultTransport(new Zend_Mail_Transport_Smtp('localhost'));
In my controller: $mail = new Zend_Mail(); $mail->setBodyText('Test Message') ->addTo($this->view->user->email) ->setSubject('Test Subject') ->send(); I have modified the subject and message here. -----Original Message----- From: Simon Mundy [mailto:[EMAIL PROTECTED] Sent: Wednesday, 12 March 2008 11:31 AM To: Steven Brown Cc: fw-general@lists.zend.com Subject: Re: [fw-general] Zend_Mail SMTP Threading? Can you send a snippet of your code used to send your mail? The Zend_Mail SMTP transport is transactional and will process each mail object by direct interaction with the target server, so I can't understand why it is executing parallel with your POP requests. Cheers > I have tried both, with the same result > > -----Original Message----- > From: Simon Mundy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 12 March 2008 11:07 AM > To: Steven Brown > Cc: 'Bill Karwin'; fw-general@lists.zend.com > Subject: Re: [fw-general] Zend_Mail SMTP Threading? > > Hi Steve - are you using the regular 'mail' transport or the SMTP > transport when using Zend_Mail? > >> Hi all, >> >> I've been writing some unit tests and have had some trouble with >> mail. >> >> I send mail using my application and then check these emails in my >> unit >> tests. All of this is handled by a local mail server (hMailServer). >> >> If I use CURL to request pages from my local server that send mail, >> the SMTP >> commands of the page all happen before the POP commands of my unit >> tests, so >> the mail is sent, then checked. >> >> If I load my bootstrap in my unit test the SMTP and POP commands are >> mixed >> up, so that not all SMTP commands are finished before POP commands >> are sent. >> This means the account can be checked before the mail has been sent, >> even >> though in the code the sending commands are before the checking >> commands. >> >> This happens whether I use PHP's mail() or Zend_Mail. >> >> 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. >> >> Any ideas on why this is happening? How can I force the SMTP >> commands to >> finish before code execution continues? >> >> Cheers, >> Steven >> >> > > -- > > Simon Mundy | Director | PEPTOLAB > > """ " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" " > > 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 > Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 > 4124 > http://www.peptolab.com > > > -- Simon Mundy | Director | PEPTOLAB """ " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" " 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com