Sir,
The php mail script doesn’t work while i am host server. That script i have already work in linux server that time it’s work but here doesn’t work. I have mentioned below what i have done in mail script in php. $to = ‘fletcherram@gmail.com’; $subject = ‘Contact Form Submitted.’; $body = "Name: “working”; $email=‘karthikeyan025@hotmail.com’;
$mailchk = mail($to, $subject, $body, $email); if($mailchk) {
echo "<script> alert('Activated Successfully. Kindly Check your Mail');</script>";
}
else{
echo "<script> alert('error');</script>";
}
can you help me…
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
function sendMail($to, $subject, $message,$from) <br> { <br> $headers = ‘From:’. $from . “\r\n” . <br> ‘Reply-To:’. $from . “\r\n” . <br> ‘X-Mailer: PHP/’ . phpversion(); <br> <br> if(mail($to, $subject, $message, $headers)) <br> return TRUE; <br> else <br> return FALSE; <br> } <br> <br>Here is a simple wrapper
Do you have an MTA installed? What’s the output of <pre>sudo netstat -plutn | grep 25</pre>? If it’s empty, run the following command: <pre>sudo apt-get install sendmail</pre>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.