8 users online. Create an account or sign in to join them.Users

Search

I’m sending emails via Symphony’s General::sendEmail in a custom event:

General::sendEmail($this->recipients, $fields['email'], $fields['name'], $subject, $body);

This seems to work fine expect for mails received using Microsoft Exchange. In Exchange the sent message starts with the embedded mail headers:

Reply-To: =?UTF-8?B?VGVzdA==?= <mr.x@test.de>
Message-ID: <5f1380497705222e85f52a25b7acbbfb@test.de> 
Importance: normal 
Priority: normal 
X-Sender: Symphony Email Module <noreply@symphony21.com>
X-Mailer: Symphony Email Module 
X-Priority: 3 
MIME-Version: 1.0 
Content-Type: text/plain; charset=UTF-8 
Date: Thu, 10 Dec 2009 22:13:42 +0100 (CET)

Did this ever happen to someone else or does anybody know if this is related to the way Symphony sends mails or to the way Exchange works?

Thanks for your help!
Nils

I hope that this is not related to the latest changes in header encoding… Which version of Symphony are you using? Which email client is used? Probably Outlook?

This has always been the case for me since early versions, in entourage. The team back then noted this had to do with my host not having its mailserver settings as they should be or something. There might be a post about it in the archive.

@Michael: It’s a 2.0.6 install (so it should be unrelated to your changes?!). It seems to work fine on my Mac but I don’t know their exact setup on Windows yet.

@newnomad: Thanks for the hint. I’ll search for that.

The site is hosted at 1&1 - pretty large company so I would be surprised if their mail servers are not set up correctly.

Yes, we’ve had this before maybe 18 months ago, caused by a mail server converting line breaks “CRLF” into “CRCRLF” (adding an extra space between headers) such that mail clients do not parse as headers, instead they parse it as the message body.

looks like your server is turning CRLF into CRCRLF (i.e. adding extra line breaks, malforming the headers)

(From the spec:) Note: If messages are not received, try using a LF (n) only. Some poor quality Unix mail transfer agents replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with » RFC 2822.

This is from an email, but was also on the original pre-Github bug tracker.

The problem seems to be that your mail server isn’t complying with “RFC 2822”. In the sendEmail in class.general.php what if you change the last line to be:

return mail($to_email, $subject, @wordwrap($message, 70), @implode("\n", $headers) . "\n", "-f{$from_email}");

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details