Codeigniter achor producing dodgy link in email inbox.. what could the problem be?
- by Psychonetics
My application is emailing out fine but the email I receive displays incorrectly. Rather than have text and a simple "click here to activate" link it doesn't. it shows this instead:
Hi user1, please click the following link to activate your account <a
href="http://mysite.com/activation/fzyZuyxVAzZS2koVg5UFjfVjlcLNcrzp">ssss</a>
Here is the code from my model that sends email to user when they request activation email.
$this->load->library('email');
$this->email->from('[email protected]', 'my site');
$this->email->to($result[0]->email);
$this->email->subject('my site - Activate your account');
$this->email->message('Hi ' . $result[0]->first_name . ', please click the following link to activate your account ' . anchor('http://mysite.com/activation/' . $new_activation_code, 'click here to activate'));
$this->email->send();
Also the mail always ends up in my spam folder.