[solved] Email Class - sending email twice (unwanted) |
[eluser]eakroko[/eluser]
hello, i have a problem with the Email Class. I simply want to send an email to a client. Here is my code: Code: $this->load->library('email'); This works fine at localhost. But on my server it sends the Email to the [email protected] AND to me ([email protected]). I don't know why I also get the email. If I use php mail() function it doesn't send the email twice. So it has to do something with Codeigniter Email-Class. I would appreciate help. Edit: with Code: $config['protocol'] = "sendmail"; Is there maybe a problem with my servers settings? When yes, why php mail() function is working ? Thanks
[eluser]CodeIgniteMe[/eluser]
Maybe the that the sender receives is an email sending failed message, which first, the message is sent back and then a big footer which tells you that the email you provided does not exist or is invalid
[eluser]eakroko[/eluser]
I also thought that this might be the problem. But I tested it with 2 valid emails of myself. The message is not sent back, it just arrives at the from-adress and the to-adress without an error. The email-class debugger shows no error.
[eluser]CodeIgniteMe[/eluser]
I use a third party script such as PHPMailer and SwiftMail so I haven't experience this bug or situation. The first thing that came to my mind is that, maybe you should re-initialize the email class especially when using a loop, to cleanup unnecesary data. But then I read again and saw that your problem is that the sender is also sent the message.
[eluser]eakroko[/eluser]
I also tried to use this: Code: $this->email->clear(); but it didnt help.. well there is no reason at all that the sender gets an email. Guess I have to use SwiftMail or another 3rd party script. Thanks anyway
[eluser]eakroko[/eluser]
Okay i solved it with the 3rd party script SwiftMailer. Thanks. |
Welcome Guest, Not a member yet? Register Sign In |