Welcome Guest, Not a member yet? Register   Sign In
Message: Undefined variable: data when trying to send HTML mail
#7

[eluser]spheroid[/eluser]
I thought I did. I checked my config file, saved as "email.php" in my config folder. Saving as "Email.php" doesn't work (debug yields nothing).

config/email.php

Code:
<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

$config['protocol'] = 'sendmail';
$config['smtp_host'] = 'mail.mydomain.com';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = 'somethinggoeshere';
$config['mailtype'] = 'html';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;

?>

function from my controller

Code:
function hey()
    {
        $this->load->library('email');
        
        $data = array();

        $this->email->from('[email protected]', 'The Management');
        $this->email->to('[email protected]');
        
        $this->email->subject('Email Test. Is this your email address: ');
            
        $message = $this->load->view('email_welcome_test', $data, TRUE);
            
        $this->email->message($message);
    
        $this->email->send();    
        
        echo $this->email->print_debugger();    
    }


Messages In This Thread
Message: Undefined variable: data when trying to send HTML mail - by El Forum - 10-10-2007, 11:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB