Jump to content

activating apache localhost email capability


planetred

Recommended Posts

Hi

I'd like to be able to send myself email when testing a user registration form via apache at localhost - ie on my local machine, not a live webserver.

 

Can anyone let me know what i need to adjust in php.ini - assuming that's where i do it - to send myself mail at localhost.

 

Thanks in advance

Set the smtp server address in your php.ini

i.e.

SMTP = mail.yourisp.com

smtp_port = 25

 

However you cannot use SMTP authentication through the ini file so mail() will not work if required

 

Use a mail library such as PEAR::Mail or Swiftmailer where you can set your SMTP settings

http://swiftmailer.org/

Display php settings using phpinfo()

<?php
print phpinfo();
?>

 

Save a file and run in your browser. It will tell you the path to the ini file.

 

In linux its usually in /etc/php.ini but not always. Unsure on windows.

 

Any changes made requires a restart of the webserver

service httpd restart

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.