Jump to content

Php Mail() Configuration


blog2

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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.

×
×
  • Create New...