"Unable to send e-mail. Contact the site administrator if the problem persists." is created when one tries to create a new user, or when a registration is attempted.

In fact, no emails are going out in D7 at all. Upgraded from D6 to D7 on the same server a while ago, two separate sites. On both, D6 emails worked fine, and on both D7 gives this error every time, ie. when creating a user, etc.

So far as I can tell, I see no configuration settings for this in the interface, and nothing changed on the server (could it be an .htaccess issue? - but if so, should that not have been taken care of during installation?)

Comments

shadowmihai’s picture

So under Configuration/Site Information under "Site Details" you MUST insert an email address from your domain, and then the email works.

The configuration setting itself says only "(Use an address ending in your site's domain to help prevent this e-mail being flagged as spam," which makes it seem optional. I was using an off-site address for the "from" address. Funny, my D6 sites do not use an email from the domain.

Why would this be an issue now?

memil’s picture

I have the same problem, when I want to test my site by registering a new test user, the following error message appears: "Unable to send e-mail. Contact the site administrator if the problem persists." I use my own Ubuntu server and doesn't have a domain yet, the server is reachable through an IP address : 10.3. ..... Any idea how to solve the problem? Thanks!

gurlinthewurld’s picture

I set up from the Site Configuration as noted above ... but still unable to send - get message:

Unable to send e-mail. Contact the site administrator if the problem persists.

Don't know if there's a way to set up SMTP or something on the back end - Any suggestions?
thanks!

shilpaKhanal’s picture

What about localhodt. I dont have a registered site. In the meantime I am using gmail account and its not working

huygir’s picture

I already had a valid email in the site configuration and was getting the "Unable to send" error message. Just in case, I changed it to an email address with the same domain (it isn't a real email address, though). Still does not work. There must be other common causes of this error, and it's apparently common in the default deployment.

Any other ideas - the thread seems mostly to be people with the problem; few solutions.

-bh

hdjay’s picture

I am learning the drupal 7.x, and I get confused about how to connect the drupal to my email. for example, i want to sent a email to any one who want to register my website use administrator's email ,but the notes alway shows like fellow sentence:"Unable to send e-mail. Contact the site administrator if the problem persists." how can I do ?
thank you.

geerlingguy’s picture

Another note, coming from Webform for Drupal 7; the 'Email to address' value had to be an external domain, in my case... not sure why... but changing that fixed the problem on one particular Webform. Very strange.

Error message is coming from drupal_mail(), btw.

__________________
Personal site: www.jeffgeerling.com

Louis Bob’s picture

solved my problem for sending emails
http://drupal.org/project/smtp

ana2012’s picture

after configure at smtp still cannot receive email after fill in field on webform... don't get email error unable to send email but haven't receive the email.... dont know what the problem... when tested on yahoo or gmail... the submitted form was received. Any ideas?

When test on Contact form that already on drupal get unable to send email error...

sunhuaifeng’s picture

I have the same problem.
How to work it out.

itlakshman’s picture

I configured the smtp and check with test mail its receiving but when i want to create a new account its receiving error 'Unable to send e-mail. Contact the site administrator if the problem persists.'

Please provide me suggestion through e-mail also ok. Waiting for reply

ttguy’s picture

This solved it for me too. Installed the smtp project and configured it to use gmails smtp server. So yay.

dax1900’s picture

I had the same error. It went away when I used an external domain (gmail) email address. This is not what I wanted so I installed and configured the SMTP module. Now it is working using the same domain name.

Aaron.Martin’s picture

If you are running SELinux, it could be the culprit:

getsebool -a | grep httpd_

See if httpd_can_sendmail is set to off, if so.... -P is to make it persistent across reboots.

setsebool -P httpd_can_sendmail on

Agiss’s picture

"setsebool -P httpd_can_sendmail on"

This fixed the error for me.

Thanks

IT_Architect’s picture

The problem is probably not Drupal's code. They could make a change to do away with the issue.

ISPs:

Non-dedicated IP:
1. If you use your ISPs assigned domestic e-mail, e.g. @myisp.com, you can use port 25. You must be logged in to receive for it to know which e-mail box to connect to, but you might not need to be logged in to send because their equipment IDs tell them exactly where the e-mail is coming from, but this is getting less and less the case. They will block any port 25 traffic to foreign domains. If they didn't, any Tom, Dick, and Harry could use them to spam from, their IPs blacklisted, and they could get sued.
2. For foreign domains, the method for receiving doesn't change, but you must use port 587 to send (e-mail submission). 587 requires authentication, which Drupal doesn't currently support. This is something that Drupal could easily change.

Dedicated IP:
If you have a dedicated IP from the ISP, then you are allowed to have an internal e-mail server, and they will not block port 25 sends. You are the same as any other server on the Internet. If you spam, on purpose or get hacked, nobody on the internet will take e-mail from your IP.

Shared hosting:

The hosting company does not block port 25. If the server's IP gets on blacklist, and it's because of you, they shut down your domain. Once you fix the problem, they may decide to wait a week or so before they put you back on line. They are in no hurry because they want it to be painful. You caused them a lot of pain when the other users on the server roasted them for their e-mails getting rejected. If you are sorta spamming as part of your business, they will use their defined-on-the-fly definition of "abuse" to justify terminating your hosting.

VPS / Dedicated:

The hosting company does not block port 25. You have a problem, you fix it. Once in awhile, blacklisters decide to block a range because of you that may include other customers. If that happens, they will make it painful for you.

Summary of options:

- If you are working from home or small business without a dedicated IP, you might get by using your ISP assigned e-mail for testing.
- Dedicated IP from your ISP
- Shared hosting / VPS / Dedicated server.
- Change the coding of the contact form to allow authenticated E-mail submissions.

subhojit777’s picture

Ubuntu users have to configure install and configure postfix in their machine.

To install postfix, refer to this stackoverflow answer

To configure postfix, refer to this link. Or simply run dpkg-reconfigure postfix and configure postfix correctly.

Now you can send email using drupal_mail at ease.... ;)

I hope this helps to Ubuntu users

Regards,
Subhojit Paul

jghyde’s picture

Install Postfix. https://help.ubuntu.com/community/PostfixBasicSetupHowto

"The simple fix is to add "-t" to the /etc/php5/apache2/php.ini file

We're interested in this part of php.ini:

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
mail.force_extra_parameters = -t

Add the "-t" for the forced extra params and reload Apache. Mail should now work!

http://gregsumner.blogspot.com/2010/03/sending-mail-from-drupal-using-po...

Local News Platform Built on Drupal
http://sanangelolive.com/

fewdea’s picture

You are awesome! This resolved the problem. I'm using nginx / php-fpm / drupal 7 on Ubuntu 16.04.2 LTS. Thank you!!!

rittnerm’s picture

I have the same problem. My email web client is working fine, it is the same DOMAIN as the website, and they come to my inbox as errors:
---------------------------------------------------------------------------------
A message that you sent was rejected by the local scanning code that
checks incoming messages on this system. The following error was given:

"Relaying not permitted"

------ This is a copy of your message, including all the headers. ------

Received: from claswa by server62.web-hosting.com with local (Exim 4.80)
(envelope-from )
id 1TQeUB-003yDK-BY
for jonh@doe.com; Tue, 23 Oct 2012 09:25:35 -0400
To: jonh@doe.com
Subject: Um cadastro foi criado para voce no site Forum B2B
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Sender: rittner@forumb2b.net
From: rittner@forumb2b.net

karolus’s picture

I was having the same issue--and was looking over a lot of things, and found a solution...

First, I went and updated to the latest version of Drupal core, then added the SMTP module. After this, I created an e-mail account for the site admin (one that doesn't get checked), and used this address in the setup for the SMTP module. Cleared the site caches, and retested. All is good now.

Also--make sure there are no spaces or returns in any field when setting stuff up, and you may want to check with your Web host on what mail port they use (usually 25 or 26).

The main cause of this issue is that some Web hosts require SMTP e-mails to be authenticated in order to cut down on spam.

Hope this helps...

GloolsGuan’s picture

Thanks man, thank you very much, You give me a great help.

phandolin’s picture

Thank you this helped me a well years later.

Yi Ran’s picture

Click:Configuration/Site Information under "Site Details" here,writing mailbox according to the domain of your wedsite mail,exampleXXX@yourdomain.com

Attention:

The From address in

automated e-mails sent during registration and new password requests

, and other notifications. (Use an address ending in your site's domain to help prevent this e-mail being flagged as spam.)

kevinquillen’s picture

If you are relaying mail through Amazon SES, the sender has to be a verified email address. The Contact module will use the logged in users email to send from, throwing this error.

===========
read my thoughts

GloolsGuan’s picture

Thanks man, thank you very much, You give me a great help.

mslywka’s picture

Installing the smtp module solved this problem for me.
Thanks!!

tetley01’s picture

by nipping back and forth to other 'solutions' on other forums and using smtp module.
email addresses in configuration and smtp are the same AND they are domain email addresses.
simply by ticking the 'send by queue' box and putting 'localhost' into the smtp server and leaving everything else as default.
worked straight awat

monstordh’s picture

Sometimes we overlook the obvious. Here's my case…

I have been working with a client that has had this problem for a long time (3 years?). Someone else initially set up the site and handed it over to me. When I finally gained access to their cPanel I realized that the email the form was trying to send to was never set up. DOH! Once I created a forwarding account for the email address being used, I had immediate resolution.

pfhenley86’s picture

My problem was with the SMTP Module. I forgot to update the settings when I moved to a new provider if that helps anyone.

I also had trouble with my server not allowing smtp from an external email so I made a cpanel email to just send the emails out from the site and it worked.

nayanalok’s picture

Following settings worked for me on windows.

Download and enable SMTP Authentication Support module

If You use Gmail to set up STMP follow these steps:

SMTP server: smtp.gmail.com

SMTP port: 465

Use encrypted protocol:Use SSL

SMTP Authentication -- Your gmail User Name and password

Leave the other options by Default

kumaratulesh’s picture

I was having the same issue--and was found a solution..

- verified the simple mail is working by using mail() function. If simple mail working fine then check the below configuration:
- go to admin/config/system/site-information and check E-mail address, you MUST insert an email address from your domain
- go to admin/config/content/webform and check E-mail address, you MUST insert an email address from your domain

Are you using SMTP to send the emails?
- go to admin/config/system/smtp and fill required settings. Use corrct Username and password for smtp authentication
- After smtp configuration you can verify it by sending test mail from same page

tatyana1234’s picture

I could get email by fixing smtp authentication.

lenniejane’s picture

How did you fix the smtp authentication? 

Mkhan777’s picture

I have added my email address for submitting a form .but whenever i hit the submit button in email it says 

Unable to send e-mail. Contact the site administrator if the problem persists.  

Please help me with this issue Cause I am new . Moreover I am not recieving any emails after form submission

Graham Leach’s picture

Aaron.Martin got it right.  SELinux was the culprit.

Set httpd_can_sendmail to on using this command:

#setsebool -P httpd_can_sendmail on

The -P is to make it persistent across reboots.