osos
osos

Reputation: 2133

Codeigniter e-mail problem

I have made a new website, and I have the following problem: when I try to send an email from the website, it give me an error, but the message sent successfully to the email

Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/content/73/8079773/html/system/language/arabic/email_lang.php:1)

Filename: libraries/Session.php

Line Number: 671

What am I missing here? By the way I'm using codeigniter framework and the email was sent successfully from my localhost machine.

Upvotes: 0

Views: 566

Answers (3)

jondavidjohn
jondavidjohn

Reputation: 62412

Make sure you have NO whitespace before <?php opening tag in your arabic email_lang.php file.

Upvotes: 1

grep
grep

Reputation: 4026

It is likely you are outputting something onto the page, which is not allowing the header redirect to happen. If you are not printing/echoing anything, make sure the script is not resulting in any errors being printed out, as this will cause the same result.

Upvotes: 1

tatorface
tatorface

Reputation: 72

What this means is that you are trying to modify the headers more than once. You cannot have ANY markup sent to the browser before specific headers are sent or else you will receive this error and the headers will not post properly.

Line 671 in libraries/Session.php is most likely sending headers to the browser, but you probably have the call to this file AFTER markup is sent to the browser. Make sure you are including libraries/Session.php before anything is posted to the browser.

more here: http://php.net/manual/en/function.header.php

Upvotes: 2

Related Questions