|
Posted by shimmyshack on 06/19/07 09:19
On Jun 19, 1:56 am, Patrick <CaptainMorganRa...@gmail.com> wrote:
> On Jun 17, 5:22 pm, gosha bine <stereof...@gmail.com> wrote:
>
>
>
> > William Gill wrote:
> > > My development machine (WinXP, Apache 2.2.4) does not have an smtp
> > > server, and I don't really want to install one if I can help it.
>
> > > Does anyone know of a simple method of testing php scripts that employ
> > > mail() by simulating an smtp server and directing output to a text file
> > > or to an installed text editor.
>
> > I have the following in my php.ini
>
> > sendmail_path = php -r
> > "file_put_contents('c:/mail.log',file_get_contents('php://stdin'),FILE_APPEND);"
>
> > this logs all emails sent via mail() to c:\mail.log
>
> > --
> > gosha bine
>
> > extended php parser ~http://code.google.com/p/pihipi
> > blok ~http://www.tagarga.com/blok
>
> I would like to try this with my linux box. Do I put that line below
> my sendmail_path line? 'php://...' has to be replaced with what for
> linux?
>
> Anything else I need to change? for example, I'm not sure if I should
> put my global smtp server(google) where it says SMTP = localhost and
> remove localhost, because it says just above it 'For Win32 only'.
>
> I think I'm getting confused over reply.. basically, what is the step
> by step procedure for this alternative you mention(other smtp, instead
> of setting one up) in a Linux box?
>
> Thanks,
> -Patrick
you can either configure your sendmail to connect to google (probably
via stunnel or putty) and pass the email on that way, or you could
write a small script that took the php://stdin and uses phpmailer to
connect to google for you (again probably through something that can
handle SSL) you get the added bonus of having being able to dump the
mail locally before it is sent by phpmailer.
both of these options use the method above with a tweak to either your
sendmail executable, or the script that handles the mail.
Navigation:
[Reply to this message]
|