Jump to content

Recommended Posts

Posted

Hi everybody! I am trying to send an email through an PHP script for authentification sakes.

It used to work out with the PHP mail() function. My syntax was:

mail("example@example.com", "subject", "message", "From: myemail@example.com");

Now that I moved to Heliohost this doesn't seem to work out anymore. It doesn't give me an error message, but I just won't recieve the sent mail at example@example.com. What could be the reason for this? Is there anything I have to configure in cPanel or in my code to get PHP mail() to work? Or is there any other way I can send an email from my script?

My preference would be an easy way to send that mail. I don't need to have special features like HTML-Email, just the way mail() used to serve it.

Thankfully,

blog2

Posted

Mail() is working fine for me in my test file:

 

<?php
$rec = 'shinryuukai@shinryuu.uni.me';
$sub = 'just a test';
$body = 'totally a test';
$head = 'From: shin@shinryuukai.tk';
echo (mail($rec,$sub,$body,$head)) ? 'Message sent!' : 'Sending failed!';
?>

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...