I have the newest stable version of Drupal and everything seems to work fine except for the email. I have checked the forums and handbook to no avail. The bottom line is that my mail is sent through an external SMTP server that requires authentication.

The exact error is: warning: mail() [function.mail]: SMTP server response: 550 Relaying denied without SMTP AUTH in C:\...\includes\mail.inc on line 193.

So, how do I get the php to send username and password authentication to the SMTP server? PHP.INI has the correct servername and ports and seems to work because the SMTP server is receving something, but not doing anything without the username and password.

This is a Windows server, with Apache, MySQL and PHP. All are up to date as I tried that first.

I found a couple of posts that there was a module to fix this (but version 5) and other comments that lead to webpages that no longer existed.

I am a Drupal and PHP newbie, but have set up SMTP in Perl before so I have some comfort level with configuration files. Any help would be appreciated.


vickybiswas’s picture

Did anyone find a solution
I am facing the same
looking for a solution hope to find one SOON.

markcupitt’s picture

Any more news on this? I have the same issue. Neet to use a Login before SMTP wll work

maxlee’s picture

I received the following message after installing Drupal 6.10 on a pc today:

Drupal installation complete

* warning: mail(): SMTP server response: 550 Relay denied in C:\apache2triad\htdocs\drupaltestsite\includes\mail.inc on line 193.
* Unable to send e-mail. Please contact the site admin, if the problem persists.

Congratulations, Drupal has been successfully installed.

Please review the messages above before continuing on to your new site.

Can someone point to or give explicit directions to solve for a mostly newbie?


thx. much.

max levy

SweeneyTodd’s picture

I have this problem at the moment as well on a hosted system. Unfortunately they upgraded their servers recently and seemed to have screwed this up as it was working previously.

Has anyone tried: http://drupal.org/node/30079 (for IIS only I am afraid).

As a temporary fix if you want to log on for the first time and did not get the e-mail try running this MySQL query to set up your password:

UPDATE users SET pass = MD5('newpassword') WHERE name = 'yourname'

I found this on the support pages a couple of months ago when I had a similar problem on my local PC and wrote some notes up so I could find them.

sycorax’s picture

same prob here

tommytom’s picture

same problem:
I get the error:
warning: mail() [function.mail]: SMTP server response: 550 Authentication is required for relay in

chanderkhanna1’s picture

same problem..any ideas???...thanks!!

handa_anuj’s picture

Simply update the php.ini file

; For Win32 only.
SMTP = mail.XXXX.com
smtp_port = 25
sendmail_from = anuj.handa@XXXX.com

I am running Apache2.2/PHP 5.2 on Windows

sycorax’s picture

still the same problem

Cineva’s picture

The simple reason why this is not working is because mail() php function is not doing authentication with the email server hence the error.

Maybe Drupal developers can provide a 'work-around' to this 'laziness'.

aiphes’s picture

i've this issue too but only on my Vista pc with wampserver and php.ini well setting up...

warning: mail() [function.mail]: SMTP server response: 550 5.7.1 ... Relaying denied. Proper authentication required. in C:\wamp\www\drupal6\includes\mail.inc on line 193.

i've some installations on wampserver/Windows XP with no problem...

Dev Server Ubuntu 12.04 LAMP PHP 5.3.10 Virtual Box
7 websites powered by drupal 6 - Hosted by OVH and Always Data

dekalaked’s picture

Is there a solution for this?

My situation is that the Contact form confirmation emails have this in the from
email From < > on behalf of < >

My host tells me:
The best way is to have your script authenticate as the mail user and then send the email. If you do not authenticate, the server won't show the correct email address when sending.

maidanet’s picture

Thank you very much :)