PHP Mailer and WAMP
Posted by: h_a (168.187.86.---)
Date: March 09, 2008 12:56PM

How can i make php mailer work with wamp...

i have downloaded it and need to be able to use the

<?
require("class.phpmailer.php"winking smiley;
etc....
?>

but firs i need to place the phpmailer files somewhere in the php.ini
but which php.ini there are two, and where in the php,ini ...

please help...

Options: ReplyQuote
Re: PHP Mailer and WAMP
Posted by: toivo (---.nsw.bigpond.net.au)
Date: March 09, 2008 01:54PM

Hi,

The phpmailer files are just like any other application source files. The may use the IP address and port of the default STMP host from the php.ini file. You can set the two parameters the same in both php.ini files. The second file is used by the PHP CLI (command line interface) scripts which can be used for example to check the integrity of the MySQL databases and send you an email if a problem was detected (and fixed).

If your application has a folder called includes or similar, create a subfolder phpmailer and copy the files there. Make sure you change the require or require_once function to point to 'includes/phpmailer/class.phpmailer.php'.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: PHP Mailer and WAMP
Posted by: h_a (168.187.86.---)
Date: March 09, 2008 02:22PM

alright i understand, but i dont point to any folder i usually place the files that i include along with the files themselves... is that ok ???

and another thing
arent I suppose to place that in the php.ini if yes under which lines ???

Thanks for the support,

Options: ReplyQuote
Re: PHP Mailer and WAMP
Posted by: toivo (---.nsw.bigpond.net.au)
Date: March 09, 2008 08:25PM

You can place the files in the same folder if you want, but it is a common practice to organize files belonging to one add-on to a separate folder.

The php.ini file usually has the default settings there already, if that is what you mean. You have to add the require or require_once function into an application module which calls phpmailer, not into php.ini which contains settings and does not get called.

And change the open tag to <?php unless you have enabled short open tags.

Regards,

toivo
Sydney, Australia



Edited 1 time(s). Last edit at 03/09/2008 08:28PM by toivo.

Options: ReplyQuote
Re: PHP Mailer and WAMP
Posted by: h_a (168.187.86.---)
Date: March 10, 2008 08:08AM

alright i want to put all the include files in one folder... how can i edit the php.ini to point to that folder for any require, require_once, include files .... ??

Options: ReplyQuote
Re: PHP Mailer and WAMP
Posted by: toivo (---.nsw.bigpond.net.au)
Date: March 10, 2008 08:48AM

Hi,

Even though it is possible to do what you suggest by setting include_path in php.ini, I believe it is more common to use a path in the include and require statements which is relative to the current working directory.

Using the current working directory, or document root, as a base is easier to maintain in a situation where the server hosts several sites which use different applications.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: PHP Mailer and WAMP
Posted by: h_a (168.187.86.---)
Date: March 10, 2008 12:02PM

alright, how can i edit the php.ini settings to enable require and require_once.

lets say i have under the www/website1/files.....etccc
and i want to put all of the other files which i want to include,require,or require_once in my website files
under one folder... www/includedfiles/....(the files)

you know wat i mean...

i dont want to include it like that <? require_once("www/includedfiles/x.php"winking smiley;
i want to included like that <? require_once("x.php"winking smiley;?>

hope i explained it better...

Options: ReplyQuote
Re: PHP Mailer and WAMP
Posted by: toivo (203.19.130.---)
Date: March 10, 2008 02:04PM

Please check the PHP documentation for include() and include_path. A good place to start is [php.net].

Regards,

toivo
Sydney, Australia

Options: ReplyQuote


Sorry, only registered users may post in this forum.