why the $&*$ is this happening? |
[eluser]sixpack434[/eluser]
We just sent HTML emails to 200 of ours users and they received a bunch of crap mainly containing the word 3D e.g. <=3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D= 3D=3D 3D=3D3D 3D=3D3D3D 3D=3D3D3D3D 3D=3D3D3D3D3D 3D=3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D3D3D3D3D3D3D3D 3D=3D3D3D3D3D3D3D3D3D3D3D3D3D3D3D Also the subject is empty?!? and errors with subject being undefined appears on the page. Of course our users are not happy and neither am I with codeigniter. Please point out If it was me writing stupid code or if this is codeigniter's fault. Code: function emailLesson($lessonNo=0,$start=0,$last=0, $personalMessage=0){
[eluser]wiredesignz[/eluser]
There's no point blaming CI, It has to be your fault for not testing your systems thoroughly before going into production. 3D is the ascii character for `=` often seen in emails that contain html. browser refresh is probably the worst way to run a repetitive task. EDIT: It seems it is your fault in any case - This from the user guide: Quote:If you send HTML email you must send it as a complete web page. Have a nice day ![]()
[eluser]sixpack434[/eluser]
I did test this before sending it to people. basically I commented the loop in the above code to send directly to my personal email e.g. Code: // foreach($query->result() as $row){ and it sent the message ok with the subject and everything. So why did it mess up when I ran it in a loop? It's ridiculous. So i've tested this by sending it to my self, I can't send to to my self 200 times, so am I still to blame or codeigniter?
[eluser]wiredesignz[/eluser]
Your HTML is not a complete web page! Read the user guide.
[eluser]Derek Allard[/eluser]
Sorry to hear about this. Anyhow, run a quick search of these forums for "=3D" also.
[eluser]sixpack434[/eluser]
I guess i'll have to go back to using PHP's mail() as that worked fine in my old website
[eluser]sixpack434[/eluser]
I read the user guide already. As I said, if you can spot an error in my code then point it out and I will happily test my code afterwards. This problem happens when I tried to send the email in a loop. It works ok If I comment the loop. The user guide doesn't say anything about not being able to use the email function in a loop?
[eluser]wiredesignz[/eluser]
The error in your code could be related to this: [quote author="wiredesignz" date="1201376946"]Your HTML is not a complete web page![/quote] It has nothing to do with looping, you may be causing the email object to crash with mal-formed HTML. Try it. Good Luck ![]()
[eluser]Craig A Rodway[/eluser]
Considering the default sender transport for the Code Igniter Email class is the mail() function you might as well stick with CI... |
Welcome Guest, Not a member yet? Register Sign In |