CodeIgniter Forums
Error while email() like html [solved] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Error while email() like html [solved] (/showthread.php?tid=22741)



Error while email() like html [solved] - El Forum - 09-18-2009

[eluser]überfuzz[/eluser]
When I use the email class to send form information to a @ddress. It works as long as I send it like plain text. But I want to style it using html and some css. When I try to alter the preferences I get a bunch of errors.

Using this:
Code:
$config['mailtype'] = "html";
$this->email->initialize($config);

Gives this:
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: From
Filename: libraries/Email.php
Line Number: 1329

A PHP Error was encountered
Severity: Notice
Message: Undefined index: From
Filename: libraries/Email.php
Line Number: 921

A PHP Error was encountered
Severity: Notice
Message: Undefined index: Return-Path
Filename: libraries/Email.php
Line Number: 570

A PHP Error was encountered
Severity: Notice
Message: Undefined index: Subject
Filename: libraries/Email.php
Line Number: 940

A PHP Error was encountered
Severity: Warning
Message: mail() expects parameter 1 to be string, array given
Filename: libraries/Email.php
Line Number: 1506
My first reaction is that these errors points to places that is out of my juristdiction. Is it my bad or what is it?

Edit: Turns out I it was sloppy typing. :red:


Error while email() like html [solved] - El Forum - 09-29-2009

[eluser]density5[/eluser]
are you using the commands below when sending the email?

$this->email->from('[email protected]', 'Email Team');
$this->email->to('[email protected]');
$this->email->subject('Test Email');
$this->email->message($data_email_send_customer);
$this->email->send();