My Drupal 5.5 installation resides on a GoDaddy economy hosting account.
When I created the first user, I did it several times because I was not getting the confirmation email. Eventually in frustration I just copied another Drupal password into this new install at the MySQL level to keep moving.
I've since installed the Webform module, but still - email refuses to work. No debug messages, no errors, nothing in the Drupal log. But no resulting email either.
I've installed the SMTP module, trying several configurations:
The Gmail Approach:
smtp.gmail.com, Port 465, Tried SSL and TLS, username@gmail.com - This yields (edited path, obviously):
* warning: fsockopen(): unable to connect to smtp.gmail.com:465 in /path/to/install/html/modules/smtp/smtp.module on line 1959.
* warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /path/to/install/html/modules/smtp/smtp.module on line 1959.
* warning: fsockopen(): unable to connect to :465 in /path/to/install/html/modules/smtp/smtp.module on line 1959.The GoDaddy Approach:
I created an account called webmaster under my GoDaddy account with 250 relays. Tested the account with my mail client, works fine.
smtpout@secureserver.net, Port 80, no SSL (tried with SSL and TLS also), webmaster@mydomain.com - This doesn't yield an immediate SMTP error, but the logs report a failure:
Error sending email: 'The following From address failed: webmaster@mydomain.com' From: 'webmaster@mydomain.com' To: 'test@mydomain.com'
My SMTP Server Approach:
Using my own personal SMTP server which I know accepts outbound connections with authentication:
mail.myserver.net, Port 25, no SSL, myusername@myserver.net. This yields:
* warning: fsockopen(): unable to connect to mail.myserver.net:25 in /path/to/install/html/modules/smtp/smtp.module on line 1959.
* warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /path/to/install/html/modules/smtp/smtp.module on line 1959.
* warning: fsockopen(): unable to connect to :25 in /path/to/install/html/modules/smtp/smtp.module on line 1959.So basically, my install has NO email functionality whatsoever... I'm seriously pulling my hair out here. Any ideas? :(
Comments
Create a test PHP page
Create a test PHP page with:
mail('you@you.com', 'Test', 'This is a test.');That will send a test mail in the simplest possible way. If it does not work, GoDaddy has not set up their sendmail properly.
Thanks ceejayoz. I seem to
Thanks ceejayoz. I seem to be heading in a working direction. I ran that test:
And indeed got a failure message. So I did some searching on PHP.net and found this post:
http://us3.php.net/manual/en/ref.mail.php#79164
Which states:
So that code in a test.php file, followed by:
emailHtml( "webmaster@myserver.com", "Test", "hello", "me@myaddress.com")Executed fine and I got the email right away!
So now... I guess my question is where's Drupal's mail code located so I can make some modifications to make this work :/
drupal's mail
the function drupal_mail() can be found at : http://api.drupal.org/api/function/drupal_mail/5
I'd suggest your server config that indeed php is allowed to touch sendmail. See http://ca.php.net/mail
cheers.
I've edited my drupal_mail()
I've edited my drupal_mail() function and at first glance I would think that it would work, or simply cut my page short. Here's what the end of the function now looks like in includes/common.inc:
This code works on it's own and will send me an email. Note the print() command - it's almost as if drupal_mail() isn't even being called. Submitting my form just brings me to the "Thank you" page with no trace of "Running altered script..." and I've checked the source and that output text from the print() command is not in there. I've double checked to make sure the SMTP module I was trying to use is disabled. Just in case Drupal was using a cached common.inc, I deleted some crucial lines and refreshed a page. Sure enough it crashed and burned so I know the correct version of the file is being used.
Still losing hair *sigh*
For what it's worth, I'm not
For what it's worth, I'm not positive this is a GoDaddy issue. I'm on a dedicated Rackspace server and experiencing the same thing. It's costing me lost of users who aren't going to wait 30 minutes+ for their email verification.

Josh Bevan
.
.
jkhskhsh jj
visdvhsdiovhdsuivhduiovhsdh hgiinbh j hhjfii hjidhju hjsiops kkljopju huush id hfjj k
same problem, same loss of hair
I'm having the same problem on Godaddy with ver 5.5 and also doing much hair pulling. I'm new to php, api, etc. so sorry I can't offer much help other than to add myself to the statistics.
For me SMTP works!
I was with the same problem, no emails sent by drupal system. But I decided to install the SMTP module, and now it's working perfectly!
All I find are people with
All I find are people with the same problem, but nothing useful, surely there is a solution, thousands use Drupal daily, I don't want to have to give up!
I recieved a success test email using smtp module and godaddy
smtpout.secureserver.net port 80 and no encryption. I added my account credentials below and it all seemed to work. I'm going to do some more testing now.