Welcome Guest, Not a member yet? Register   Sign In
Email output problem
#1

[eluser]eokorie[/eluser]
Anyone know why some characters are are being replace by "=" in emails I am generating using the CI email class? Everything seems to work but I cant seem to figure out why random "=" keep popping up.

this is the email function I wrote:

Code:
function _contact_form_email($formData)
        {
            $config['protocol'] = 'smtp'; // Options: mail, smtp and sendmail
            // $config['mailpath'] = '/usr/sbin/sendmail';
            $config['charset'] = 'utf-8'; // iso-8859-1 or utf-8
            // $config['wordwrap'] = TRUE; */
            $config['mailtype'] = 'html'; /* html or text */
            
            $config['smtp_host'] = '127.0.0.1';
            $config['smtp_user'] = '';
            $config['smtp_pass'] = '';
            $config['smtp_port'] = '25';
            $config['smtp_timeout'] = '30';
            
            $this->email->initialize($config);
            $this->email->set_newline("\r\n");
            $this->email->from('localhost', 'Emmanuel Okorie');
            $this->email->to('[email protected]');
            // $this->email->cc('[email protected]');
            // $this->email->bcc('[email protected]');

            $this->email->subject('New Enquiry Submitted');
            $message     =    "Nature Of Enquiry: " . $formData['nature_enq'] . "<br />";
            $message     .= $formData['name_enq'] . " [" . $formData['email_enq'] . "] wrote: <br><br>";
            $message     .= $formData['comment_enq'] . " <br><br>";
            $message     .= "Site URL: " . $formData['url_enq'] . " <br>";
            $message     .= "IP Address: " . $formData['ip_enq'] . " <br>";
            $message     .= "Date Submitted: " . $formData['date_enq'] . " <br>";
            $this->email->message($message);    

            $this->email->send();
            
            //to debug we can use print_debugger()
            // echo $this->email->print_debugger();
        }

When I submit a form, the details are sent to my email. But this is a result that I get:

Quote:Nature OF Enquiry: quote
Emmanuel [[email protected]] wrote:

this =s a test comment!

Site URL: http://www.grafikkaos.co.uk
IP Add=ess: 127.0.0.1
Date Submitted: 2009-08-18 20:30:01

Anyone know what's wrong?

Thanks
#2

[eluser]DieterStruik[/eluser]
He eokorie,

I have the same problem and tried to change the charset of the source file, but without luck. Seems like something happens during the parsing process.

One thing that did improve the result was using a full HTML-page.

&lt;html&gt;
&lt;body&gt;...mail body...&lt;/body&gt;
&lt;/html&gt;

But I keep getting trailing numbers in received mail like:

--B_ALT_4aa64032e7948--

Anyone?

Greets, Dieter
#3

[eluser]stijnvdb[/eluser]
I'm having the exact same problem, mailtype is html and charset utf-8. Even when sending as a full html page the characters keep popping up, very annoying...

Code:
$config = Array(
                   'protocol' => 'smtp',
                'smtp_host' => 'auth.ptasp.com',
                'smtp_port' => 25,
                'smtp_user' => 'xxx',
                'smtp_pass' => 'xxx',
                'mailtype'  => 'html',
                'charset'   => 'utf-8');
            
            
        
            $this->load->library('email', $config);
            $this->email->set_newline("\r\n");
Any ideas as to where this is coming from?




Theme © iAndrew 2016 - Forum software by © MyBB