Jump to content

email didn't work


Recommended Posts

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 post
Share on other sites
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 post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...