Welcome Guest, Not a member yet? Register   Sign In
Email over SMTP is sent, but CI returns false
#1

[eluser]Daniel Kvasnicka jr.[/eluser]
Hi people,
CI is a wonderful thing, I switched from CakePHP and I like the way CI does not stand in my way and yet it serves me with many useful classes.

However, I have a weird problem with sending e-mail over SMTP. The email is sent, but CI's send() method returns FALSE. The first problem is, that it shows SMTP's 220 Service ready response as an error (with "The following SMTP error was encountered" before it). And the second problem is "354 Enter mail, end with "." on a line by itself". Is this some kind of incompatibility between CI's mail class and some mailservers' specific configs? (ESMTP Sendmail 8.13.6/8.13.6.)

Message sent was:
Code:
User-Agent: CodeIgniter
Date: Wed, 31 Oct 2007 11:08:45 +0100
From: "dan"
Return-Path:
To: [email protected]
Subject: Test mail
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Testing

(the real address was exchanged for "[email protected]" so that crawlers don't find it here)
#2

[eluser]Daniel Kvasnicka jr.[/eluser]
I've probably posted this to a wrong section, sorry. Some admin, please move this to the right section... Thanks.
#3

[eluser]Daniel Kvasnicka jr.[/eluser]
I're reviewed CI's email class and found out that it is very fragile as regards SMTP error codes. The only SMTP code it accepts is 250, however there are much more codes that don't signalize error, see http://tools.ietf.org/html/rfc2821#section-4.2.2 (220, 354 etc.)

I've fixed the class on my local installation and filed a bug: http://codeigniter.com/bug_tracker/bug/2967/




Theme © iAndrew 2016 - Forum software by © MyBB