Page 1 of 1

[1.4.0. + FIX] SMTP broken / HTML Emails not correct

Posted: Fri Jan 15, 2010 5:35 pm
by OSWorX
Due an bug in ../system/library/mail.php HTML-emails are not correct sent.
Another bug belongs to SMTP: if enabled your server is not able to use SMTP because of a wrong header (gets wrong answer back from mailserver).

Attached the fixed version.

Unzip package and transfer the file (use same structure).

This fix might belong also to earlier OC versions (specially SMTP).
On your own risk you can try it with OC versions < 1.4.x.

Due another bug in the newsletter module (1.4.x) I have made another package (see other thread) which corrects several bugs (also included there this fix).

UPDATE: new version (fixes also the SMTP bug and the subject encoding)
UPDATE: currently not avaliable

Re: [1.4.0. + FIX] SMTP broken / HTML Emails not correct

Posted: Sun Jan 17, 2010 9:11 pm
by Daniel
i'm using your fix in the next version, but i'm sure soem ppeople will still have problem with this method.

Re: [1.4.0. + FIX] SMTP broken / HTML Emails not correct

Posted: Tue Jan 19, 2010 8:36 pm
by Miguelito
I tried this "fix" with OC 1.4 installation of mine and order update did send a mail to the customer with subject but without any content. So something is not right...

Re: [1.4.0. + FIX] SMTP broken / HTML Emails not correct

Posted: Wed Jan 20, 2010 12:28 pm
by KGal
It's not working for me either with the updated file, the mail arrives blank? Using mail instead with fresh install works for sending mails.

Re: [1.4.0. + FIX] SMTP broken / HTML Emails not correct

Posted: Wed Jan 20, 2010 2:28 pm
by Miguelito
Yep, we are testing this with joomx so this is NOT working at the moment...

Re: [1.4.0. + FIX] SMTP broken / HTML Emails not correct

Posted: Thu Jan 21, 2010 11:02 pm
by Daniel
This is a successful mail I sent using my server.

Code: Select all

To: 
Subject: test
From: Your Store<your@email.com>
Reply-To: Your Store<your@email.com>
X-Mailer: PHP/5.2.8
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_NextPart_47b8cbc18b2d52da14ca55750522b02c"
Message-Id: <E1NXvV0-0001cQ-V8@hostingseries42.net>
Sender:  <opencart@hostingseries42.net>
Date: Thu, 21 Jan 2010 11:46:54 +0000
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - hostingseries42.net
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [605 32003] / [47 12]
X-AntiAbuse: Sender Address Domain - hostingseries42.net
X-Source: /usr/bin/php
X-Source-Args: /usr/bin/php /home/opencart/public_html/dev/admin/index.php 
X-Source-Dir: opencart.com:/public_html/dev/admin
 
 
------=_NextPart_47b8cbc18b2d52da14ca55750522b02c
Content-Type: multipart/alternative; boundary="----=_NextPart_47b8cbc18b2d52da14ca55750522b02c_alt"
 
------=_NextPart_47b8cbc18b2d52da14ca55750522b02c_alt
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
This is a HTML email and your email client software does not support HTML email!
------=_NextPart_47b8cbc18b2d52da14ca55750522b02c_alt
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
 
<html dir="ltr" lang="en">
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body><p>
	this is a html test!</p>
</body>
</html>
 
------=_NextPart_47b8cbc18b2d52da14ca55750522b02c_alt--
The problem should not be the code but how the server sends out the mail message.

Re: [1.4.0. + FIX] SMTP broken / HTML Emails not correct

Posted: Wed Jun 16, 2010 1:20 am
by patchouly
I'm not sure I understand what you mean by "this is a successful email"

So are you saying it is supposed to appear as html code?

When I sent a newsletter to myself, the entire email appears with html code, with <head>, <body>, <p>, etc. in the copy.

How do I prevent this?