Enable php default mail() in easyengine

hi am new for server side and also easy php. am created 1 wordpress site with easyengine but mails are not sending. password reset and simple php mail code are also not working please help me :frowning:

apt-get install sendmail

ee stack install --mail

He dont need the whole mail package, he needs the ability for php sending mails, without having a mailserver, nor webmail clients running there.

Sendmail fits more at this case.

yes i want thats only…

wowww, am tried many times this same command but not worked, now its working super… but its going on spam, is anyway to reach in inbox ???

Thank you ggloveswp ,portofacil

There are maaany (really many) reasons that an email reaches spam instead of inbox. Googling around will help you for sure. Also, this tool will help you take proper actions: https://www.mail-tester.com/

hi ggloveswp, if am give forget password in wordpress it working, but my simple php mail () function not working. plz help me. see the code

<?php $to = "[email protected]"; $subject = "HTML email"; $message = " HTML email

This email contains HTML Tags!

Firstname Lastname
John Doe
"; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From: ' . "\r\n"; $headers .= 'Cc: [email protected]' . "\r\n"; if(mail($to,$subject,$message,$headers)){ echo "send"; } else{echo "failed";} ?>

i got send message. but in my inbox and spam nothing mail came…

I didnt suggest creating a PHP sendmail file for troubleshooting.

1 Like

am installed the sendmail by running the command and now am make 1 php mail file to check.

am uploaded the file in below link. page is working but i didn’t get mail after submitting. plz help me.

http://hirich.in/contact-form.php

Use a transactional email service, like SparkPost, SendGrid for sending or install PHPMailer. Or if you want a complex solution try ZohoMail, etc. Mail() is not reliable and shouldn’t be used in production environment in my opinion.

hi am tried php mailer but that also not working, please help me guys,

Are the SMTP ports open in your firewall?