Welcome Guest, Not a member yet? Register   Sign In
email class problem with other language
#1

[eluser]shinokada[/eluser]
If I use English I have no problem to send email. However when I try to send it in Norwegian, it send email but I get the following error.

Code:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\ci\system\language\norwegian\email_lang.php:1)

Filename: libraries/Session.php

Line Number: 662
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\ci\system\language\norwegian\email_lang.php:1)

Filename: helpers/url_helper.php

Line Number: 541

This is what I did.

I created folder called norwegian in system/language/. I downloaded danish languages since they are very close. And unzipped into that folder.
I changed english to norwegian in the config file.

And the following is my email codes.

Code:
$name = $this->input->post('name');
    $email = $this->input->post('email');
    $message = $this->input->post('message');
    $myemail = '[email protected]';
    $this->load->library('email');
    
    $this->email->from($email.$name);
    $this->email->to($myemail);
    
    $this->email->subject('Email message form MYWEBSITE.com');        
    $this->email->message("sender: ". $name."\r\nSender email: ". $email. "\r\nMessage: " . $message);
    $this->email->send();
        
    $this->session->set_flashdata('subscribe_msg', 'Thanks for your message! You have sent email.');
    redirect('newcontroller/kontakt');


If I take out all the email parts it outputs Thank you message. And as I said before, english with the above code works fine. So I am not sure what is wrong.

Any help will be appreciated.

Thanks in advance.


Messages In This Thread
email class problem with other language - by El Forum - 01-11-2010, 12:06 AM
email class problem with other language - by El Forum - 01-11-2010, 12:27 AM
email class problem with other language - by El Forum - 01-11-2010, 01:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB