I've been having a helluva time for at least a couple of weeks because the email on my Drupal system wasn't working. It turns out to be a really simple fix.
Be warned though: I run my own LAMP server and you have to have access to your php.ini file (which most webhosting accounts apparently don't). Also, I have no idea whether this solution conforms with Drupal "best practices" or not...I just wanted to get the email system working and wasn't too worried about crossing t's and dotting i's. If the way I've done this violates some server admin's sense of how to properly do things then there's no point in giving me grief about it now. I posted asking for help several times on this issue and no one helped, so this is my own kludgy, duct taped version of a solution. I welcome any better answers, though:
This is what I did:
1. Edit my php.ini file on my Linux server (I use Ubuntu and found it at /etc/php5/cli/php.ini yours will almost certainly vary)
2. Find the entry that reads:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
3. I changed "localhost" to my mailserver's name (smtp.mailserver.com or you can even use your ISPs mailserver, as an example: smtp.secureserver.net)
4. Save the file, and it works.
My Drupal will now send email to me as admin, allows me to send email to users, and will send new users email when they sign up...all things I couldn't do until now.
Vince
Comments
Nothing wrong I can see with
Nothing wrong I can see with your solution.
Your solution wasn't a Drupal solution so much as it was a php/smtp server configuration solution. Drupal gets the default smtp server information from the php config. It seems your local SMTP server was not configured to allow messages to be sent through localhost or your system was not resolving localhost. Again, not a bad thing, just a 'some' thing.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Help!
Hi there,
I'm having this exact same problem as you were, why isn't there an easier solution?! I can't locate my php.ini file, possibly due to my webhost! I simply can't find it!
What solutions do I have apart from completely disabling my emails, which I really don't want to do because it makes my whole website a little pointless!?
Thanks,
Danny