Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.