gongpex Posted December 26, 2012 Share Posted December 26, 2012 Hello everyone, Before I post this thread I want to say "Merry Christmas" for anyone who celebrate. Today I tried to create email to send other email using this code : <?php$to = "myemail@gmail.com";$subject = "Test mail";$message = "Hello! This is a simple email message.";$from = "someonelse@example.com";$headers = "From:" . $from;mail($to,$subject,$message,$headers);echo "Mail Sent.";?> But when I open my email, it won't sent anything, Q : Actually what requirement to create email, so that at least it can be send message to other email? please someone answer me Thanks Link to comment Share on other sites More sharing options...
satishpoul Posted December 26, 2012 Share Posted December 26, 2012 if you are trying this from localhost server you must have to do some setting like add port for SMTP and all.. but if u use this on live it will work without any settings.. Link to comment Share on other sites More sharing options...
kanchatchai Posted December 26, 2012 Share Posted December 26, 2012 https://code.google.com/a/apache-extras.org/p/phpmailer/ Link to comment Share on other sites More sharing options...
gongpex Posted December 31, 2012 Author Share Posted December 31, 2012 if you are trying this from localhost server you must have to do some setting like add port for SMTP and all.. but if u use this on live it will work without any settings.. I had try this before on live, not at localhost, but this won't work, I use free domain hosting, and the hosting support it. please tell me if there is some setting thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now