Setting up Apache2 (Test Server on localhost) for email

Setting up Apache2 (Test Server on localhost) for email

am 03.04.2006 01:40:39 von natalie vacca

Hi all,

I am designing a PHP5, MySQL website. I am developing on my local machine,
Windows XP and Apache 2. How do I test sending emails PHP mail() function.

Do I need to set up Apache to run CGI. If so, how. Please.

Thank you in advance,
Clinton

Re: Setting up Apache2 (Test Server on localhost) for email

am 03.04.2006 06:01:04 von Shion

natalie vacca wrote:
> Hi all,
>
> I am designing a PHP5, MySQL website. I am developing on my local machine,
> Windows XP and Apache 2. How do I test sending emails PHP mail() function.

You need to install a mailserver and modify your php.ini to support the
installed mailserver.


> Do I need to set up Apache to run CGI. If so, how. Please.

Depending on what kind of php you write, it can be a good idea to really test
it in a real environment.


//Aho

Re: Setting up Apache2 (Test Server on localhost) for email

am 03.04.2006 10:54:53 von natalie vacca

Thanks J.O.,


I will test it in the real enviroment, but would like to test it with other
code on my test server.

To me this is right:

....
$txtHeaders = 'From: me@myplace.com' . "\r\n" .
'Reply-To: me@myplace.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();


mail($txtTo, $txtSubject, $txtMessage, $txtHeaders);

All other variables are defined to. Do I need to log in to the sending
account somehow?

Thanks anyone who can help.
NV

"J.O. Aho" wrote in message
news:49bl00FnujuhU3@individual.net...
> natalie vacca wrote:
>> Hi all,
>>
>> I am designing a PHP5, MySQL website. I am developing on my local
>> machine, Windows XP and Apache 2. How do I test sending emails PHP mail()
>> function.
>
> You need to install a mailserver and modify your php.ini to support the
> installed mailserver.
>
>
>> Do I need to set up Apache to run CGI. If so, how. Please.
>
> Depending on what kind of php you write, it can be a good idea to really
> test it in a real environment.
>
>
> //Aho

Re: Setting up Apache2 (Test Server on localhost) for email

am 03.04.2006 15:39:53 von Roger Dodger

I highly recommend that you look at PHPMailer. It is a mailing class
that takes many of the details out of the way, leaving you with a nice
set of functions that make mailing easy. There is also a mailing list
and archives that are filled with answers to common problems. It
supports both embedded images and attachments. You can find details at

http://phpmailer.sourceforge.net/

and an excellent tutorial at

http://www.phpfreaks.com/tutorials/130/0.php

Re: Setting up Apache2 (Test Server on localhost) for email

am 03.04.2006 17:00:46 von Shion

natalie vacca wrote:

> To me this is right:
>
> ...
> $txtHeaders = 'From: me@myplace.com' . "\r\n" .
> 'Reply-To: me@myplace.com' . "\r\n" .
> 'X-Mailer: PHP/' . phpversion();
>
>
> mail($txtTo, $txtSubject, $txtMessage, $txtHeaders);
>
> All other variables are defined to. Do I need to log in to the sending
> account somehow?

It's nothing with your php-code to do, you need to configure your php-engine
to use a mailer program/server, look in your php.ini, which most likely is
somewhere where you have got your php-engine installed.


//Aho

Re: Setting up Apache2 (Test Server on localhost) for email

am 03.04.2006 19:04:57 von Simon Bridgewater

try postcast server.

http://www.postcastserver.com/


"J.O. Aho" wrote in message
news:49crkuFnqpmgU3@individual.net...
> natalie vacca wrote:
>
> > To me this is right:
> >
> > ...
> > $txtHeaders = 'From: me@myplace.com' . "\r\n" .
> > 'Reply-To: me@myplace.com' . "\r\n" .
> > 'X-Mailer: PHP/' . phpversion();
> >
> >
> > mail($txtTo, $txtSubject, $txtMessage, $txtHeaders);
> >
> > All other variables are defined to. Do I need to log in to the sending
> > account somehow?
>
> It's nothing with your php-code to do, you need to configure your
php-engine
> to use a mailer program/server, look in your php.ini, which most likely is
> somewhere where you have got your php-engine installed.
>
>
> //Aho