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

[eluser]spheroid[/eluser]
I'm able to send email by defining my HTML mail message within the code directly. But according to another post on the forums, I realized I could load a view. When I do I get this message:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: data

Filename: controllers/user.php

I'm loading my email config variables from email.php. Here is the code to load the view/create the email (partial):

Code:
$this->email->subject('Email Test. Is this your email address: '.$sendto);
$message = $this->load->view('email_welcome_test', $data, TRUE);
$this->email->message($message);
$this->email->send();

What can I do to fix this? Thanks in advance!!


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



Theme © iAndrew 2016 - Forum software by © MyBB