I need help with this script I downloaded I got it installed into my Database etc I have it intergrated perfectly into my website Now thing is, I type out a email inside it and then I add the address to send the newsletter to, it will then say Email sent after I click send I then goto my email inbox and it never arrives... could someone help me? I got it from here http://plohni.com/wb/content/php/Free_scripts.php scroll down to the 5th script it says "Easy Newsletter" I would be glad if someone could help me figure the solution to my problem I am having with it!
Try this first in a separate file: (change the email addresses) ini_set('display_errors', 1); error_reporting(E_ALL); $to = 'your@address.com'; $subject = 'Test'; $message = 'This is a test'; $headers = 'From: your@server.com' . "\r\n" . 'Reply-To: your@server.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if (!mail($to, $subject, $message, $headers)) { echo 'Can\'t send mail.'; } else { echo 'Success'; } PHP:
I put that on my server, in a new directory just to test it and went to the test.php that I put that info in and all that pops up is Success
Yes, and did you receive an email? (you did change the email address in the code, right?) Btw, you should test with at least two different destination addresses.
I would ask your host if you are allowed to send mail because the test script I sent you is the standard way to do it, and if that doesn't work I think your host may be blocking you from sending mail.
check your mail box for the spam folder. Because "From" header in the mail was not specified, some mail services mark the mail as spam. if not, check for smtp settings on control panel of your website.
This has been fixed thanks for all the help guys Problem was because it was on a free host, so I purchased hosting and it works