Author Topic: Problem with <branckets> when sending mail...  (Read 4471 times)

0 Members and 1 Guest are viewing this topic.

Offline leh00

  • Newbie
  • *
  • Posts: 22
    • View Profile
Problem with <branckets> when sending mail...
« 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

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Problem with <branckets> when sending mail...
« Reply #1 on: March 29, 2005, 11:08:12 AM »
Strange error, never heard about it. Try this:

Open includes/email.php and replace all

Code: [Select]
From: %s
with

Code: [Select]
From: <%s>
Don't forget to remove brackets from the Administrator Email in your settings.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline leh00

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Problem with <branckets> when sending mail...
« Reply #2 on: March 31, 2005, 08:35:45 AM »
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

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Problem with <branckets> when sending mail...
« Reply #3 on: March 31, 2005, 10:14:42 AM »
You use SMTP, right? Try this:

Search for

Code: [Select]
fputs($fp, "MAIL FROM: ".$this->from_email.$this->crlf);
and replace it with

Code: [Select]
fputs($fp, "MAIL FROM: <".$this->from_email.">".$this->crlf);
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline leh00

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Problem with <branckets> when sending mail...
« Reply #4 on: March 31, 2005, 10:45:30 AM »
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