Access/Send mail while you are working on Localhost with PHP

by · June 26, 2012

When you are using PHP core, CMS or any Framework. There are number of places where you need to send email, like account conformatoin, forgot password, order comformation. You can leave the email part to test beacuse you are working on local server. You can check these email functionalities, email templates on Localhost also by using the script below.

Steps for email setup on Localhost:

1) Open php.ini file.

2)  Search “[mail function]” from php.ini if it exists replace it by following code or just Copy the following code and paste it into php.ini file.

[mail function]

; For Win32 only.

; http://php.net/smtp

SMTP = mail.test.com            //it indicates mail server

; http://php.net/smtp-port

smtp_port = 25                       // it indicates port address

 

; For Win32 only.

; http://php.net/sendmail-from

sendmail_from = you@yourdomain

3) Done now you can restart your server and test now.

 

If you have any queries related to this drop a mail to vikas@knowahead.in or let us know in comments.

 

 

 

VN:F [1.9.22_1171]
Rating: 9.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)
Access/Send mail while you are working on Localhost with PHP, 9.0 out of 10 based on 2 ratings

You may also interested in: