The re-sending of an email address doesn't work with basic installation.

I updated PHP.INI to include a "sendmail_from =" email address.

The problem is that since there is no password given, the email server (rightly) says it can't relay the email (since it's not authenticated).

How to fix this? Is there a way to "authenticate" the send mail so you don't get the infamous:

warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [email address here] in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal-5.2\includes\common.inc on line 1979.

Perhaps this is a localhost issue since Drupal may be doing its own email sending?

The only solution I found on the forum seemed to relate to IIS and not to Apache.

????

Thanks in advance for help with this issue.

This appears to be my last post installation problem.

-- M

Comments

vm’s picture

Is there a mail server installed on localhost ?

_____________________________________________________________________
Confusious says:
"Those who seek drupal answers should use drupal search!" : )

morkus’s picture

A mail server on the local machine? Nope, it's just a Windows PC.

However SendMail works from the local machine in my Java programs. However, when I use SendMail locally, I have to include the user and password for the target email account or I would also get the relay errors.

Does Drupal really expect the email server to send email without an authenticated user/password?

What am I missing?

Thanks.

- M

Stuart Greenfield’s picture

As Windows PCs don't have a mail server on them you need to tell PHP to relay email via a remote server. Amend your PHP.ini file to include a reference to an outgoing server (E.g. the server you would normally relay your mail through).

This is the section you're looking for - I think it is commented out in a standard PHP.ini file, so simply uncomment, add the server, and restart Apache.

[mail function]
; For Win32 only.
SMTP = some.email.server.com
smtp_port = 25

________

Just five more minutes...

www.stuartandnicola.com

morkus’s picture

Stuart,

That worked great!!!

Thank you very much.

-- M

najibx’s picture

warning: mail() [function.mail]: SMTP server response: 550-(NAJIBX) [60.54.127.138]:29900 is currently not permitted to relay through 550-this server. Perhaps you have not logged into the pop/imap server in the 550-last 30 minutes or do not have SMTP Authentication turned on in your email 550 client. in C:\wamp\www\golf-my\includes\common.inc on line 1981.

How do I permit to relay? Can use any public smtp server that allow this?
-najibx-

Stuart Greenfield’s picture

I *think* that means that the outgoing server you are trying to use requires authentication for outgoing email (usually done to protect against it being used for spam). As far as I know you can't use such servers directly from within PHP - the php.ini setting is only valid for "open" servers. You'd need a more comprehensive piece of code that would handle the authorisation step for you. One example (no idea what would be involved in incorporating it though!) is here.

If you don't have access to such a server I'm not sure what other work-arounds there might be - hopefully someone else is watching this thread and can advise!
________

Just five more minutes...

www.stuartandnicola.com

najibx’s picture

I will try this instead because I am using wamp5 which does not come with any smtp server so you cannot set emails with it

This module allows Drupal to bypass the PHP mail() function and send email directly to an SMTP server. The module supports SMTP authentication and can even connect to servers using SSL if supported by PHP.

New features for drupal 5.0 include the ability to use SSL to connect to SMTP servers like gmail. Get it here: http://drupal.org/node/95819

This module uses the smtp and mail class's from PHPMailer.
http://phpmailer.sourceforge.net

-najibx-

fairflow’s picture

I've the same issue (needing to use an authenticating SMTP server). Can anyone advise as to how to do this with version 6.10 which I've just installed locally?

vm’s picture

There is a beta of the SMTP.module for Drupal 6.x found on the project page.

phpdude’s picture

I was having the same problem- thanks
subscribing