how to send Email from localhost

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Devendiran
Forum Newbie
Posts: 1
Joined: Sat Aug 09, 2008 6:24 am

how to send Email from localhost

Post by Devendiran »

i want to send mail from localhost. can u help me?
thanks for advance
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

Re: how to send Email from localhost

Post by eshban »

Code: Select all

 
    ini_set("SMTP","smtp.yourisp.com");
    ini_set("smtp_port","25");
    ini_set("sendmail_from","info@mywebsite.com"); 
 
in your php file where you have write the email code. just put these three lines, and in first line, setup your isp smtp address.
 
secondly in php.ini, uncomment this line
 
SMTP = localhost
 
Thats all.
 
Thanks
 
 
Post Reply