p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Pro PHP (http://p2p.wrox.com/forumdisplay.php?f=96)
-   -   Running PHP Triad on Win98 - Help with email? (http://p2p.wrox.com/showthread.php?t=4921)

timmaher October 14th, 2003 03:26 AM

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

nikolai October 14th, 2003 02:33 PM

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/

irldonalb July 15th, 2004 05:23 AM

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


irishhotels July 15th, 2004 12:11 PM

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


richard.york July 15th, 2004 06:35 PM

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
::::::::::::::::::::::::::::::::::::::::::

j4uk3n November 22nd, 2006 03:43 AM

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



All times are GMT -4. The time now is 10:15 AM.

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