4images Forum & Community
4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: leh00 on March 25, 2005, 02:03:36 PM
-
Hi,
I have the following problem when sending emails...
When I'm in the "Control Panel" under "User verwalten/Email senden" an do a test - I receive the error message "501 - Syntax error, missing brackets."
Then I played arround with the setting added the brackets under "Allgemein/Einstellungen/Administrator Email" from admin@meineDom.com to <admin@meineDom.com> -> the sending of email works then...
But if I send an eCard the Error message is still the same - probably a different kind of code sending the mail...
Does somebody knows where exactly I will have to change the code in the script that I will be able to send mails from both sections without having the brackets in the admin email settings?
Any help is appreciated...
Regards
Hanspeter
-
Strange error, never heard about it. Try this:
Open includes/email.php and replace all
From: %s
with
From: <%s>
Don't forget to remove brackets from the Administrator Email in your settings.
Jan
-
Hi Jan,
thanks for your replay. The problem is that my mail server just accepts proper request (according RFC 820 or so...) where the replay address has to be in brackets.
Well I changed on 3 positions the code like you told me, but the result is still the same...
In adition I added to line 153 this: echo $header."<-myheader<br>";
to make sure that the brackets are set, but unfortunately the complete header is never displayed:
-------------------Error message-------------
Return-Path: myemail@domain.net From: <-myheader
Email Error: MAIL FROM invalid mail server response: 501 Syntax error, missing brackets
-------------------Error message-------------
That's all what I got...
Is there a place in the code where I could display the complete header/email just to make sure everything is send correctly?
Your help is appreciated
Hanspeter
-
You use SMTP, right? Try this:
Search for
fputs($fp, "MAIL FROM: ".$this->from_email.$this->crlf);
and replace it with
fputs($fp, "MAIL FROM: <".$this->from_email.">".$this->crlf);
-
Jan,
thanks -> it works perfect...
Maybe put this in your future scripts -> so your scripts are not just only absolutely great they will be according the RF2821/3.3 :mrgreen:
Regards
Hanspeter