Welcome Guest, Not a member yet? Register   Sign In
Emails Not Sending
#1

[eluser]Bl4cKWid0w[/eluser]
My script is supposed to send out an email upon registration for account activation. For some reason, users that register do not receive this email. Everything else works fine, just not the email. This is my code:

Code:
$config['mailtype'] = 'html';
            $this->load->library('email');
            $this->email->to($user['email']);
            $this->email->from("Fourth Core Dot Com");
            $this->email->subject("Activate Your Account");
            $this->email->message("&lt;HTML&gt;Hello, ".$user['displayname']."!  You recently filled out a registration form at FourthCore.com.  If you did not, ignore this email.  To complete the registration process, you must first activate your account.  You can do this by clicking on the link below.<br><br><a href='http://www.fourthcore.com/register/activate/".$user[' target='new'>http://www.fourthcore.com/register/activate/".$user['activationcode']."'<br><br>Thank you for registering,<br>The Fourth Core Team&lt;/HTML&gt;");
            $this->email->send();
#2

[eluser]Michael Wales[/eluser]
Syntax error in $this->email->message()
Code:
.$user['

Additionally, why use double-quotes if you are concatenating for all of the variables? That's the only benefit to double-quotes - parsing variables without concatenation (it's slower BTW).

Plus, you are using single quotes to surround HTML attributes, which invalidates your HTML.




Theme © iAndrew 2016 - Forum software by © MyBB