Email - Sending Twice on single send? |
[eluser]nevsie[/eluser]
Not sure why, but playing with some rough code for a callback from a form to send an email. Simple and easy enough... however the email arrives twice!!! any idea folks? Code: function send_email($email)
[eluser]eriksays[/eluser]
did you ever get this issue resolved? i'm experiencing this as well.
[eluser]Pschilly[/eluser]
I am also having this issue... No resolution to speak of.
[eluser]eriksays[/eluser]
I did not diagnose the "why", but I did discover the "what". basically -- the send() was being fired twice -- once at the controller layer, and once at the view layer. Even though I didn't have any views being loaded, the application was still loading a default view and firing the send() call at that time as well. by putting a die() at the end of this function, I resolved my problem. I realize that's pretty hackalicious but for me, this particular function is not ever part of the view cycle anyway, it's a weekly automated message routine. if that solution doesn't work for you, perhaps taking the mail functions out of the controller layer or diagnosing further is always an option, too. |
Welcome Guest, Not a member yet? Register Sign In |