Welcome Guest, Not a member yet? Register   Sign In
Error while email() like html [solved]
#1

[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:
#2

[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();




Theme © iAndrew 2016 - Forum software by © MyBB