Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2003, 03:26 AM
Authorized User
 
Join Date: Jun 2003
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default Running PHP Triad on Win98 - Help with email?

Hi,

I have successfully installed "PHPTraid" on my win98 pc (apache, mysql,php). I have done this to create and test a php/mysql guestbook for a site I'm developing. The Guestbook is working great!!!


One thing I would like to be able to test is the notification email that the guestbook generates when a new message is posted. I would also like to test a feedback form!

Is there anyway to configure Outloook / Outlook Express to work with "localhost" on my desktop?

Many Thanks For your Time!!


Tim
__________________
Tim
 
Old October 14th, 2003, 02:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm sorry, I don't fully understand what you want to do... can you be more specific? 'configure Outlook to work with "localhost" on my desktop' doesn't quite compute with me.

Outlook and Outlook Express are mail clients; that is, they connect to servers and download mail messages stored on a server using either POP3 or IMAP, protocols used to read messages stored on an "incoming" mail server.

PHP is a server-side language and can be used to send emails using SMTP, a protocol used to send messages through an "outgoing" mail server.


That said... what exactly do you want to do? PHP's mail() function returns TRUE or FALSE, depending on whether the mail was sent successfully or not. If that's not enough verification for you, then you can use mail() to send messages to yourself. On a windows installation of PHP, you need to specify the SMTP server for outgoing messages in your php.ini file. You can set this to localhost if you have an SMTP server running. IIS comes with an SMTP server that runs as a Windows NT Service; you can install this and tell PHP (via php.ini) that your smtp_server is localhost.



Take care,

Nik
http://www.bigaction.org/
 
Old July 15th, 2004, 05:23 AM
Registered User
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi guys,

I'm having the same problem on win xp. Is there anyway i can configure php on my local machine

Donal
http://www.top-results.co.uk

 
Old July 15th, 2004, 12:11 PM
Registered User
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry lads

I don't think its possible. Sendmail is a apache program. i would like if someone could prove me wrong.

regards
irishhotels
http://www.irishhotels.com

 
Old July 15th, 2004, 06:35 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Nik's post pretty much says it. You have to specify an SMTP server in php.ini to use PHP's mail functionality in Windows.

An SMTP server is a server that sends your mail. Outlook doesn't have anything to do with that. Outlook is a mail client, it communicates with servers that send and receive mail. You can specifiy an SMTP server in php.ini via an ISP.. such as mail.yourhost.com, or you can install an SMTP server on Windows and use that to send mail.

One free SMTP server is:
http://www.postcastserver.com/

Then all you have to do is set up the SMTP host name in postcastserver. The easiest way is to just use localhost.

Then in php.ini you modify the SMTP directive.
Code:
[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only
sendmail_from= me@localhost.com ; for Win32 only
Update the SMTP directive with the hostname of your SMTP server. Now the mail function works.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old November 22nd, 2006, 03:43 AM
Registered User
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by richard.york
 Nik's post pretty much says it. You have to specify an SMTP server in php.ini to use PHP's mail functionality in Windows.


One free SMTP server is:
http://www.postcastserver.com/

Then all you have to do is set up the SMTP host name in postcastserver. The easiest way is to just use localhost.

Then in php.ini you modify the SMTP directive.
Code:
[mail function]
; For Win32 only.
SMTP = localhost ; for Win32 only
sendmail_from= me@localhost.com ; for Win32 only
Update the SMTP directive with the hostname of your SMTP server. Now the mail function works.

you said

http://www.postcastserver.com/ is a SMTP server

Then all you have to do is set up the SMTP host name in postcastserver. The easiest way is to just use localhost.

so do i change the php.ini into

[mail function]
; For Win32 only.
SMTP = localhost
; for Win32 only
sendmail_from= me@localhost.com
; for Win32 only


or do i change it into

[mail function]
; For Win32 only.
SMTP = http://www.postcastserver.com/
; for Win32 only
sendmail_from= me@localhost.com
; for Win32 only


well sorry i'm a total newbie here, so i don't quite get what u meant there, thanks in advance






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem running PHP locally shoreman BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 April 24th, 2005 11:37 AM
Running cmd line .EXE through PHP geolast PHP How-To 2 January 6th, 2005 02:34 PM
Email Problem When Running from Shared Drive Ron Howerton General .NET 7 November 11th, 2004 04:28 AM
Php running problem Yee PHP How-To 5 October 26th, 2004 08:58 PM
php downloads instead of running ss2003 Beginning PHP 2 February 16th, 2004 03:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.