Welcome Guest, Not a member yet? Register   Sign In
Errors in documentation for Email Class?
#1

[eluser]sparky672[/eluser]
I was having some difficulty getting my text based email messages to respect my line return characters.

Basically, any line return characters contained within my message strings were being ignored...

Code:
\r\n

... and my messages were rendering on one line in all email clients.

See my StackOverflow posting for the exact details: stackoverflow.com/q/15604719/594235

I assumed the official documentation, where it clearly says the "mailtype" preference defaults to "text", was accurate. This cannot be the case however, because when I explicitly set it to "text", my original problem was solved.

Code:
$config['mailtype'] = 'text';

Am I misinterpreting the docs somehow? If it says that "text" is the default, then why would I have to explicitly declare it as such?

Thank-you!

Also, it says, "There are 17 different preferences available". I see 18 in the preference chart. This is not a problem to me, but I figured somebody here would want to correct this minor typo as well.

------

EDIT:

Regarding the "crlf" and "newline" preferences, why don't these settings default to compliance with the RFC 822 standard? Seems odd to make "standards compliance" as the "alternative" option and mention it in the notes. Just make it default? Is there any reason you wouldn't want to comply with RFC 822? Any insight appreciated.
#2

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums!

mailtype really does default to 'text'. Have a look at the source code and see for yourself. I don't see how physically setting it would make any difference at whatsoever (again, see the code), unless a configuration file was automatically loaded with the library, that actually set it to 'html'.

Taken from the Email library source code:
Quote:The RFC 2045 compliant CRLF for quoted-printable is "\r\n". Apparently some servers, even on the receiving end think they need to muck with CRLFs, so using "\n", while distasteful, is the only thing that seems to work for all environments.

Hopefully that answers your question.
#3

[eluser]sparky672[/eluser]
Yes, I found it and I will update my SO thread accordingly.

I have Ion Auth installed and the Ion Auth config file is over-riding it...

Code:
$config['email_config'] = array(
'mailtype' => 'html',
);

Thank-you!




Theme © iAndrew 2016 - Forum software by © MyBB