PDA

View Full Version : Drupal 7 (final) cannot send any emails!



Faissl
01-07-2011, 06:25 AM
I would like to thank all the magnificent people of HostMonster support. they are the best on the internet.
still there maybe issues that can be out of the normal support manuals way of life!
I've installed the final version of Drupal 7 the very day it's been released, but it can't send any mail by any way. contact form or action triggers.
It's a simple out of the box install, no special settings at all.
what to do..?

Faissl
01-07-2011, 12:39 PM
I had no intention of pumping the topic & I don't like pumping in general, but 105 views without a single replay..? this is a bit too much..

Falcon1986
01-07-2011, 09:11 PM
Well, I don't live on this forum and I'm sure others don't as well. We are all volunteers, therefore no one is obligated to give a response. BTW, not all of those pageviews are from human visitors; bots are constantly crawling forums such as this.

To your issue: Have you set up e-mail accounts through cPanel for Drupal to use?

Faissl
01-08-2011, 03:54 AM
I know all these things for sure, I was forums admin myself for many years.
about "setting up my email for drupal" I did not for I used drupal and mail both out of the box in my last hosting company, so I know nothing about setting my email for drupal
more infos about that would be useful..

Falcon1986
01-08-2011, 09:05 AM
I do not use Drupal, so am unfamiliar with its setup.

However, the e-mail setup that I am speaking about is the general e-mail setup that you configure through cPanel. Log in to cPanel and go to Mail > Email Accounts to set up the accounts.

I believe, like many other CMSes out there, Drupal uses phpmail out of the box to send e-mails. You should be able to configure it to use SMTP to send mail as an alternative (might require additional modules), but that's another story.

Once you set up your e-mail account(s) in cPanel, set up PHP Config (cPanel > Software/Services) to use PHP5 (Single php.ini) > Save changes. Generate a default php.ini file within ~/public_html ("Install php.ini master file"), rename it if necessary to php.ini and find the sendmail_path line. Modify it to look something like this:

sendmail_path = "/usr/sbin/sendmail -t -i -fmyemail@mydomain.tld"
Note that myemail@mydomain.tld is the e-mail address that you created in cPanel (modify to suit your scenario). There is no space between the -f flag and the e-mail address. Save the modified php.ini file and try sending mail through Drupal.

Faissl
01-08-2011, 10:19 AM
I salute you..!
all works great, it took me some time cuz I kept receive failure mails with misspelled email in it. I searched php.ini and the site information and everything till I fount it in contact form setting. after fixing it all worked.
something else I came through it in process, I went to /admin/modules then initiated "run cron" command, I hit into a load of errors about "zen theme" in tmp files...! :confused: I never installed Zen..!
also another error msg when I tried to install a module. until I figure all about it.
the drupal settings out of the box points to:

/tmp
as a temp directory. which is not good because -on hostmonster servers- it is a shared directory. so that zen thing was belonging to some neighbor :D and I don't have permission to access it.
so I went into /admin/config/media/file-system and edit the temp file to:

/home/myusrname/tmp
note for googlers: if your host only gives you access to www folder, you can even make a tmp folder into your drupal installation, I think the path could be just:

tmp
still thanking you falcon :)

ligiahag7902
03-19-2011, 09:15 PM
I salute you..!
all works great, it took me some time cuz I kept receive failure mails with misspelled email in it. I searched php.ini and the site information and everything till I fount it in contact form setting. after fixing it all worked.
something else I came through it in process, I went to /admin/modules then initiated "run cron" command, I hit into a load of errors about "zen theme" in tmp files...! :confused: I never installed Zen..!
also another error msg when I tried to install a module. until I figure all about it.
the drupal settings out of the box points to:

/tmp
as a temp directory. which is not good because -on hostmonster servers- it is a shared directory. so that zen thing was belonging to some neighbor :D and I don't have permission to access it.
so I went into /admin/config/media/file-system and edit the temp file to:

/home/myusrname/tmp
note for googlers: if your host only gives you access to www folder, you can even make a tmp folder into your drupal installation, I think the path could be just:

tmp
still thanking you falcon :)


I also think so.

lawschoolcure
08-25-2011, 08:40 PM
you can send email from drupal 7 without getting mixed up in the code, using the smtp authentication module, but it requires a bit of tinkering, which took me longer than I'd have expected :( to figure out. here's my summary: lawschoolcure.com/drupal . -new user