Hi users,

I just installed drupal 6.0 on my server. I have the error likes "Unable to send e-mail. Please contact the site admin, if the problem persists" at the end of the installation. I also have the same error message when create a new user. It looks like mail doesn't get send, it could cause a big problem that new users can not get a initial password. How to get / configure send mail?



crinch’s picture


I am also facing this problem. I have even set the SMTP server in the php.ini file but there is no solution.
Waiting for help.


eggthing’s picture

Same problem.

Meg Lee Chin

david.sarnowski’s picture

Me as well. Anyone have an idea?

er.bhagwat’s picture

same problem when i am using drupal5.7

anyone know how to solve this problem

PeterRogelj’s picture

Often, there is more than one copy of php.ini file - and only one is the right one. Usually it is located in Windows directory or in apache/bin.

on2’s picture

I got the same error message. And I did modify the apache/php.ini and php/php.ini under xampp. Still does not work. It looks like it uses the php/php.ini for the smtp configuration.

This is what I configured in php/php.ini

SMTP = ip.address
smtp_port = 25

I ran on Window XP.

Any helps please!!


arhak’s picture


Can somebody translate this http://groups.drupal.org/node%252F10306 ?

Philip’s picture

I had the same problem..But it solved with these codings.
SMTP=ip address
smtp_port = 25
; For Win32 only.
sendmail_from = me@example.com


bdtushar’s picture

I have same problem

WorldFallz’s picture

no one is says if they're using *nix or windows-- just as an fyi, if you're using wamp (windows) to run drupal, you'll have to either get an smtp app for windows (like http://www.hmailserver.com/) or try the http://drupal.org/project/smtp module.

"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

bdtushar’s picture

Hello there is no module for 6.x for smtp. Is there any other solution

WorldFallz’s picture

as i said, if you 're on windows, you can install a mailserver....
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

arhak’s picture

mine is on Ubuntu 6.06, PHP 5.1, MySQL 5
the ISP says php.ini is just fine and working for other websites (it's a shared hosting) but can get mail delivered. Function mail keeps failing.
Nevertheless I can ensure php.ini it's well configured, since the ISP states it's configure via SMTP & smtp_port but through phpinfo() I see there is also a value for mail_path and the doc states it's preferred than the SMPT config which will be ignored since not in Windows and mail_path is set.
So, what can I do? In the doc it seems like I can't override mail_path
How can other websites on that hosting work properly being mail_path set?
So I'm also looking if this can be an issue of Drupal 6. Would it be?

WorldFallz’s picture

I doubt it's a drupal issue or there would be tons of bug reports. More than likely it's your isp and their configuration-- i've got several sites (d5 & d6) running on shared hosting and have never had a problem with email. the only time it's been a problem is on windows boxes, and in those cases I use the smtp module.

You're probably going to have to work with your host to get it sorted out... unless someone with some *nix email knowledge chimes in.

one other question that comes to mind-- you didn't use a "1-click" installer (like fantastico) did you?

"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

arhak’s picture

No, I use my own profile installer, which I have tested in Debian and Wamp, also worked in the Ubuntu host the only probs are with the mail on Wamp (of course) and the Ubuntu host.
I also think the prob is in the host's config, but the ISP keeps saying everything is fine (lot of mails and phone calls)
I even searched for a more accurate mechanism to tell the ISP they are wrong, but couldn't find anything beyond what I already told them.

WorldFallz’s picture

the "the customer is always wrong" philosophy of isps gets really irritating. I can understand that they have to defend themselves against people who know nothing and can't be bothered to read, but you also shouldn't need an act of congress to "prove" something needs to be looked at from their end.

did you search around the forums for your isp? i've solved a lot of little issues simply by searching "drupal" in my isp forums and browsing the posts there....

"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

arhak’s picture

is the first Drupal on that shared hosting, and that ISP isn't free but I'm not paying for it, so.. the aim is to "persuade them"

juan_g’s picture

In my case, the solution was Drupal's SMTP module, mentioned by WorldFallz on this thread. Currently, there are versions for Drupal 5.x and 6.x. See the install.txt and readme.txt files included with the module.

arhak’s picture

It worked for me too, but on a live site.
Does it work behind a proxy already?
I have Drupal for my enterprise's intranet with a patch for D6 to work behind a proxy, but our e-mail server is (by now) outside the proxy and firewall. Firewall shouldn't be a problem since I can request any port to be opened.
A few weeks ago I tried SMTP and didn't work behind the proxy (proxy without authentication), also tried with the firewall completely off (just in case)

rajmataj’s picture

I have two different Drupal 6.6 installs on two different locations. Each uses the SMTP Authentication module with phpmailer inside it (as instructed). Both modules are current as of Nov 26, 2008.

On one site I needed to use username/password authentication for the mailer to work. On the other, I needed to keep the username/password fields for the smtp authentication blank in order for that site to work. Try both these variations on your site and perhaps yours will work too...

xavier.loiseau’s picture


I have the following platform:
- Ubuntu 7.10
- Apache 2.2
- PHP 5.5
- MySQL 5
- Drupal 6.10

When an E.mail is sent from the "Contact" form, the same error is displayed:
"Unable to send e-mail. Please contact the site admin, if the problem persists."

Is it possible to fix this issue without having to install the SMTP module ?

Thank you for your help.


mnp’s picture

hi xloiseau
my system configuration is same as you
iam also getting same error
if u solved please share with me

victorburgos’s picture

This is what I did:
On my hosting company root website folder edited the file php.ini
SMTP = localhost
smtp_port = 25
sendmail_from = victor@mydomain.com
I also had to create an email account called victor@mydomain.com on the server so the from address was what I expected it to be.

Hope this helps.

BTW: I also changed the max upload size so I can upload large files from drupal
upload_max_filesize 100M
post_max_size 100M

mnp’s picture

thanks for your reply
same thing i have done i got it

anil.pothuraju’s picture

hi every one
im new to drupal
i want to send emails from my drupal on localhost machine.
i wrote the code like this

$to      = 'anil.pothuraju@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: anil.pothuraju@gmail.com' . "\r\n" .
    'Reply-To: anil.pothuraju@gmail.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion() . "\r\n ";

$mail = mail($to, $subject, $message, $headers);
if ($mail)
  echo "mail sent";
  echo "Not Sent";

i also edited the php.ini file as

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = anil.pothuraju@gmail.com

i checked the email address in administer>site configuration>site information

that address is also same as "anil.pothuraju@gmail.com"

i saved it as "mail.php" in localhost

if i run this file it throws an error like this

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for anil.pothuraju@gmail.com in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mail.php on line 9
Not Sent

can i send mails from my localhost.
or is there any configuration settings i need to do.
please can anyone help me out of this problem.

thanks in advance

jiten.jitendra’s picture

I have also same problem on same configuration.
if u have got any solution for this, then please share with me.


Scott Smith’s picture

I noticed everyone has been having a lot of problems with this. The issue with me, was that sendmail did not have an entry in my virtualuser table for the user that the httpd web server was running under. In my case it was running under the "apache" user and that entry needed to be added to the virtualuser table. Otherwise Drupal mail ended up in /var/www/dead.letter.

In my case, I had to edit /etc/passwd and make the "apache" user a valid login as its shell was /bin/false. Then I became the super user so I could again switch to the "apache" user and try sending mail. Once I added the apache user to /etc/mail/virtusertable and rehashed the /etc/mail/virtusertable.db, I was able to send mail from the web server user, "apache", and was then able to send email from Drupal.

As the "apache" user:
sendmail -t -i your_email_address@domain-name.com
testing ...
ctrl + d

And it should send an email to that address with no subject and the text "testing ..."

I then changed the login shell for the "apache" user back to /bin/false.

I hope this helps someone because it was a really tough thing to fix and it has nothing to do with the Drupal install and everything to do with the sendmail configuration. Once the sendmail configuration is correct for the httpd web server user, all will be right with the world.

Those running their web server as the root user, will likely not see this problem.

Dimitri Raptis’s picture

I did not have problems with sending automatically emails when a new user requested an account until I changed the email adress at: yourDomain/admin/settings/site-information.

Thus the problem was solved for me when I replaced it with the old email assigned to my username (I am the site administrator).

Hope it works for you as well.

Good luck


borngunners’s picture

I created a form and did all the things I am suppose to do and it worked. But I am still receiving an error message. See below:

Unable to send e-mail. Please contact the site administrator if the problem persists. 
LEternity’s picture

Subscribing. It happened from one day to the next, without any warning. The only thing I changed were file permissions (to meet the Drupal security standard).

Summit’s picture

Subscribing, testing to solve mail problem.
greetings, Martijn

errand’s picture

Make sure that SMTP server is localhost in php.ini (use phpinfo to know) and the sendmail_path's email is the same as in drupalsite/admin/settings/site-information

nihonsei’s picture

I am facing this problem at the end of re-installing Drupal 6.17.
Unable to send a message throught contact form (usign contact module).

Unable to send e-mail. Please contact the site administrator if the problem persists.
Your message has been sent.

My website is hosted on "Bluehost".
I followed the instruction given by Bluehost.

The settings at http://www.made-in-japan.org/admin/settings/site-information indicate that
you are currently setting your "From:" header to ****@live.com. This
should be changed to an email address that you have configured at
https://box***.bluehost.com:***/frontend/bluehost/mail/pops.html for the your domain.
Once this has happened, you should have no trouble getting mail to send.
Level II Tech Support Engineer

I set email address that I have configured at Bluehost.com. I am still facing this problem.
Is it Drupal related problem or Host server (Bluehost.com)?

Kindly tell me how to solve this problem.

Best regards,

nihonsei’s picture

It was not a Drupal's bug.

Solved by Bluehost.com support team.

Reply from Bluehost.com

The issue was a problem on the server end with sendmail. It's a rare occurrence, but after testing some things on another server, it was determined to be the case in this particular instance. Once the problem was identified, it was resolved.

We apologize for the trouble you have been having. There was an issue with sendmail on your account but we had our admins take a look at it and it is now working fine. Your script should now be working as long as you have it set up to send from an email address that exists in your cpanel -> mail -> email accounts.

Hanscraft’s picture

I tried this by creating a new email address in cpanel -> mail -> email accounts and then copied and pasted that email address into my site configuration with no luck. However, I'm using the signup module which might be why...

Patricia_W’s picture

I was having this error when I added a new user and wanted to send them a notification.

In my case I fixed the problem by unchecking the "use mimemail for all messages" ... which states that it applies to system messages. I'm a bit concerned it will cause a problem for messages that are sent by different modules. I wonder what defines system messages.

Patricia W

japo32’s picture

Billions of Blessings to you Patricia_W!! I was cracking my head on this problem for around 8 hours before I found your comment.

You're a lifesaver!

I wonder why this feature in MIME Mail is buggy.