blog2 Posted November 22, 2012 Posted November 22, 2012 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
Shinryuu Posted November 22, 2012 Posted November 22, 2012 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!'; ?> 1
blog2 Posted November 23, 2012 Author Posted November 23, 2012 Alright, it worked out! Although I did not find any mistake in my previous code, nevermind.. Thanks anyway!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now