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

[eluser]HooJee[/eluser]
Hi Guys

I am trying to send mail using the email lib. However, whenever I execute it the echo message and print_debugger method are not executed and the email does not reach my inbox. Code below:

Code:
$ADMIN_EMAIL="[email protected]";

// get POST variables
$name = $this->input->post('name');
$email = $this->input->post('email');
$comments = $this->input->post('comments');

// send email
$this->email->from($email, $name);
$this->email->to($ADMIN_EMAIL);
$this->email->subject('Message sent from MySite.com');
$this->email->message($comments);
$this->email->send();
echo $this->email->print_debugger();
echo "email sent";
#2

[eluser]Slowcheetah[/eluser]
If you execute this code on a local/development server be sure you configure your SMTP settings on the server, otherwise no email will be send.
#3

[eluser]HooJee[/eluser]
Its on a live server ..




Theme © iAndrew 2016 - Forum software by © MyBB