Hi,

I setup and configured a Drupal install on GoDaddy. And I realized that my Webform doesn't send emails - even worse, requesting a new password from the drupal login screen doesn't send an email either, even tho it says "Further instructions have been sent to your e-mail address." - However, nothing ever arrives but following php code to test the mail function seems to work fine:

// The message
$message = "Line 1\nLine 2\nLine 3";

// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);

// Send
mail('example@example.com', 'My Subject', $message);

What might I be missing? Please advise!

Thanks!
Ron

Comments

jaypan’s picture

Make sure that the site address is an existing email address. Some servers will not send email addresses if the email address doesn't actually exist, in order to prevent spamming.

Contact me to contract me for D7 -> D10/11 migrations.

cerr’s picture

yep, but the email address in my drupal configuration does exist!

vm’s picture

if drupal is reporting that the mail is sent, I'd venture a guess something is happening to it after drupal hands it off. If on a shared host check to see if the IP address of your server is blacklisted.

cerr’s picture

but the above php script works from that same server...

Cory Goodwin’s picture

Do you logs show any messages?
/admin/reports/dblog

jaypan’s picture

I just realized you aren't using Drupal's Mail API. So drupal will not give you any information as to what's happening. There isn't really much we can do to help either, as the problem will be somewhere on your server unrelated to Drupal.

If you use Drupal's mail API you will get more information that we can help you with. Here's tutorial for Drupal 6, but Drupal 7 is pretty much the same: http://www.trevorsimonton.com/blog/drupalmail-example-tutorial-explanation

Contact me to contract me for D7 -> D10/11 migrations.

cerr’s picture

Ha! Dummy me! Emails went to the spam folder. Sorry for wasting everyone's time but thanks for attempting to help me! Much appreciated!

Thanks all and my apologies!