Strange Email Issue |
[eluser]macmonkey[/eluser]
I'm using CI for the first time and have spent plenty of time in the manual. I'm using the Email Library to send a registration confirmation email but it is hanging up in everyone's spam folder. In addition the spam folder problem the html message that DOES show up up has random "=" equal signs throughout. Here is my debug stuff: Code: User-Agent: CodeIgniter Any help is greatly appreciated.
[eluser]Derek Jones[/eluser]
Have you hacked the email class? That's using quoted-printable mime encoding but is reporting to the MUA that it's 8bit. My suggestion would be to grab the latest copy of the email class from the SVN to eliminate any possible hacks and to receive the benefit of some recent changes.
[eluser]tonanbarbarian[/eluser]
Derek You imply that if the encoding is 8bit that it should not be using quoted-printable, yet neither CI 1.6.3, nor the latest version from SVN appear to take the encoding into account. I have just had to extend my Email library to fix a problem with this. I basically added a new property to the class and if it was set i added the Content-Transfer-Encoding: quoted-printable header and then called $this->_prep_quoted_printable otherwise I do not. I had to do this because if I did not turn this off Outlook 2003 and Outlook 2007 would not handle the quoted_printable format correctly. In the best case the links did not work and in the worst case the message contained = at various places in the body of the message. Is there some rule in Email processing that if using an 8bit encoding quoted-printable is not needed? And if so maybe the email library should reflect this correctly. In the meantime I will continue with my modification because it seems to be working, however I would like some feedback on this as I am planning to convert an email marketing application I built to CI and want to be sure this will not be an issue. Thanks
[eluser]Derek Jones[/eluser]
I think you're misunderstanding. The HTML portion of your email should have: Code: Content-Transfer-Encoding: quoted-printable not Code: Content-Transfer-Encoding: 8bit As you have in your output above. When you send HTML emails, the HTML portion will be prepped for quoted printable automatically, this is not something that you handle in your controllers. Your messages are rendering with = signs because the MUA doesn't know that the content is using the quoted-printable MIME type, where the = is an escape character. This indicates that you are either using the library incorrectly, or it is not up to date, or has been modified.
[eluser]tonanbarbarian[/eluser]
Ok I can see that, however having worked with PHPMailer library before I notice that in that library you can set different encoding that is handled different ways 7bit or 8bit just has EOL processing, and quoted-printable has similar processing to the one used in the CI email library. Is this ability to determine the transfer encoding going to be added to the CI email library? Because as I stated I found an issue with Outlook not supporting quoted-printable correctly, (or perhaps it does not like the way CI implements it I have not checked fully) So my hack has essentially allowed me to use a different transfer encoding, although I now realise that I should be setting the tranfer encoding to 8bit or similar if I have turned off quoted-printable. I am actually considering using PHPMailer for the time being as I have used that extensively before and know it has no issues.
[eluser]Derek Jones[/eluser]
Outlook works fine with CI's quoted-printable MIME encoding. Remove your hacks, use the latest email class from the SVN, and try it again. If you have problems, post your controller code and attach the content you are trying to send.
[eluser]Zuki[/eluser]
Hello, I have the same problem with my HTML email. I have just downloaded the latest CI version and it doesn't help -- I still have random equal signs throughout my email body. Below is my controller code. Please help, thank you! Code: $this->load->library('email');
[eluser]Derek Jones[/eluser]
Did you get the file from the SVN or the release version? The latest changes are not in the release version yet.
[eluser]Zuki[/eluser]
I got it from SVN at http://dev.ellislab.com/svn/CodeIgniter/...libraries/
[eluser]Derek Jones[/eluser]
Your sample controller works just fine for me in all MUAs I have access to. 1) What is the server environment? 2) What MUA are you receiving the email with? 3) What is the RAW source of the received email? 4) Please post the full controller method and content, without leaving anything out (other than using example.com email addresses for display purposes). |
Welcome Guest, Not a member yet? Register Sign In |