Hi I use a simple code to send email by PHP like: <?php $email="myemail@yahoo.com"; $subject="test email"; $message="test message"; $sent=mail($email,$subject,$message); if($sent) echo "Mail sent"; else echo "Mail was not sent"; ?> Code (markup): I used this code on my host and it was working. But from 2 days ago, emails are not received to the inbox I contacted my host and they told me to make sure about this rule: you must change the mail server from "mail.your_domain.name" to "scriptmail.intermedia.net" But I don't know what I should do about this
i am not expert but maybe its problem on your script if its not then i am sure you are configure your mail service with server database like mysqk perl and others that you chose to use
I'm not sure, but I think that you should change the line "SMTP" in php.ini. As an aside, delivering emails is more complicated than this. To be sure, one also needs to check the reverse DNS for the mail server, if the HELO string is correct, and one needs to implement SPF and DKIM in the DNS, and one needs a spam checker to preview the messages. Then one might deliver stuff (or not).
I think you just need to add "from" attribute before using mail() function. So, you should add complete header like Here note that the from domain should be same as your hosted domain.
checking on your code i'm pretty sure its working 99% though its not complete since no header parameter but it should work fine. Now my guesses are: a.) it could be that your email were placed to spam or bulk b.) it could be your server email configuration (but in most cases it's setup properly by default so no need for you to worry about this part)