I've read the installation instruction but still can't get it to work. I edit the php.ini and added the path to the include_path...
(before) include_path = "c:\php\pear";
(after) include_path = "c:\php\pear;c:\php\3rdparty\phpmailer";
But I still get the warning message that says it can't find it. It works if I put the phpmailer folder in one of the directories in my site. I would like it to work the first way so that I don't have to keep adding the phpmailer folder on every site I need it on.
I googled and can't find an explanation that an ordinary person can understand. All that I found assume you are born knowing PHP
Here are what I'm using:
Windows XP Pro SP2 / IIS 5.1 / PHP 4.3.11 / PHPMailer 1.72
Thanks in advance
How do I setup phpmailer in Windows?
Moderators: egami, macek, gesf
- ruturajv
- php-forum Super User
- Posts: 1279
- Joined: Sat Mar 22, 2003 9:42 am
- Location: Mumbai, India
- Contact:
you need an SMTP server, it works on your site because probably it has sendmail running
for Windows XP,
for Windows XP,
- open "inetmgr" from the "Run"
- Go to SMTP virtual server. and Enable it by pressing Start/Play button
- Right click on it and open properties
- go to the Access tab
- press relay button, and add 127.0.0.1 and your local IP address
thx ruturajv, but my smtp is setup and working correctly. i just want PHP to recognize phpmailer so that all my sites will know where the files are when i add the require_once
- ruturajv
- php-forum Super User
- Posts: 1279
- Joined: Sat Mar 22, 2003 9:42 am
- Location: Mumbai, India
- Contact:
please check php.ini file for
Code: Select all
[mail function]
; For Win32 only.
SMTP = 127.0.0.1
; For Win32 only.
sendmail_from = me@localhost.com
there's nothing wrong with the mail function or smtp. it's setup and working fine. what i want PHP to do is to recognize phpmailer class. phpmailer is not a builtin class that came with PHP. it's a third party class i downloaded. the instructions told me to edit the php.ini and add the path where phpmailer is in the include_path but it still doesn't work.
- ruturajv
- php-forum Super User
- Posts: 1279
- Joined: Sat Mar 22, 2003 9:42 am
- Location: Mumbai, India
- Contact:
but you MUST do an
if the file is in your include path, then no need to specify the exact filepath or else you will have to give exact file path
Code: Select all
include 'class.phpmailer.php';
if the file is in your include path, then no need to specify the exact filepath or else you will have to give exact file path
ya, i ended up copying the phpmailer folder on every site i have and it works. i just wish i can somehow have PHP know where the phpmailer folder is for every site and have it store only in one place.
thanks for the help
thanks for the help

- ruturajv
- php-forum Super User
- Posts: 1279
- Joined: Sat Mar 22, 2003 9:42 am
- Location: Mumbai, India
- Contact:
w1n78 wrote:ya, i ended up copying the phpmailer folder on every site i have and it works. i just wish i can somehow have PHP know where the phpmailer folder is for every site and have it store only in one place.
thanks for the help
for that you need to set
Code: Select all
include_path = ".:/usr/local/lib/php:/your/common/scripts/path"