View Full Version : Mail server for PHP
12-28-2006, 04:33 PM
Is it possible to use my ISP's mail server to send outgoing email through PHP or do I need an actual mail server installed on the system? I use my home PC for PHP development but I don't have a mail server installed on the machine itself as I just use my ISP's incoming/outgoing mail servers for e-mail.
EDIT: Using Windows XP Pro if that matters.
Since you have PHP installed on Windows XP, it is actually very easy to use PHP to send emails.
Note: I have not tested the following configurations on IIS. Personally, I use Apache2 and works like a charm.
You can do this in two ways.
1- Open php.ini in your favourite editor and edit the following line (around 602)
SMTP = localhost
You should add your SMTP server there. Personally, I use my ISP outgoing mail server and works like a charm.
2- Add the following code in the page you wish to use to send emails.
Note: replace YOUR_SMTP_HERE with your ISP outgoing mail server.
If you are using outlook, then just use the outgoing smtp server and that should get it working.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.