Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Testing email functions within PHP on my local machine
- Date: Wed, 4 Jul 2007 10:59:50 +0900
- From: "Dave Gutteridge" <ebisudave@example.com>
- Subject: [tlug] Testing email functions within PHP on my local machine
TLUG,
My home machine is set up as a LAMP server, but just for testing PHP scripts locally. It doesn't serve pages to the internet.
Recently, I've been writing some scripts that have email functionality. However, I can't seem to test them because my PHP environment can't find an SMTP server.
I'm hoping I don't have to install an SMTP server on my local machine, because my understanding of SMTP is that it is very complicated.
Instead, I was hoping I could just specify one of the SMTP servers that are available to me through my various email accounts. I have one with my ISP that I use to send mail from within Thunderbird, and a couple that are on my webhosting service.
I've been trying to figure out how to do this, but I'm going around in circles.
First, I thought I could specify an SMTP host within the mail() function of PHP. But I'm not sure if it's something I can specify within the headers.
Second, I thought I would download the phpmailer classes from SourceForge. Although these classes give me an option to specify an SMTP host, I keep getting the following error:
Mailer error: SMTP Error: Could not connect to SMTP host.
Last, it seemed that maybe what I needed to do was specify an SMTP host to use in my php.ini file. However, the section on SMTP says, right in the file that it applies to "Win32 only":
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
There's a "sendmail_path" variable, but wouldn't I have to have a local SMTP installation in order for it to be on my path?
What is the simplest and most reliable way to be able to send email via SMTP with my local LAMP testing environment?
Thanks for any advice.
--
Dave M G
- Follow-Ups:
- Re: [tlug] Testing email functions within PHP on my local machine
- From: Darren Cook
- Re: [tlug] Testing email functions within PHP on my local machine
- From: Keith Bawden
Home | Main Index | Thread Index
- Prev by Date: [tlug] [OT] Intel core duo errata
- Next by Date: Re: [tlug] [OT] Say _no_ to the Microsoft Office format as an ISO standard
- Previous by thread: Re: [tlug] [OT] Intel core duo errata
- Next by thread: Re: [tlug] Testing email functions within PHP on my local machine
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links