Welcome Guest, Not a member yet? Register   Sign In
Codeigniter email class issue

Hello, from the beginning I would like to write that I know that similar topics are already on this forum. But read all and still didn't catch the solution... :/

I have a mail with the message :
$this->email->message($this->load->view('/email/activation_email', $data, TRUE));

Inside this view I have a content

echo 'Hello '. $username . ', this is your activation email';
echo '<br />';
echo 'Press the activation link below to activate your account on our site';
echo '<br /';
{unwrap}<a href='http://localhost/register/activate/$userid/$username'>Activation Link</a>{/unwrap}

I loaded the email class with my configuration array

$config = Array(
                    'protocol' => 'smtp',
                    'smtp_host' => 'smtp.host.com',
                    'smtp_port' => 587,
                    'smtp_user' => 'mylogin',
                    'smtp_pass' => 'mypass',
                    'mailtype' => 'html',
                    'wordwrap' => FALSE

                $this->load->library('email', $config);

When I send this email I can see all text but the activation link doesnt work and still get this 3D and additional "=" sign
like this:
< href=3D'http://localhos=

I have no idea how to solve this issue. Anyone mabe solved this problem?
I would appreciate your help,
thx for responding

maybe try writing like this:

<a href="http://localhost/register/activate/&lt;?php echo $userid . '/' . $username; ?&gt;">Activation Link</a>

but with processing those variables is everything fine, the userid and username are correct.

are you setting the mailtype correctly? $this->email->set_mailtype('html'); ??

not sure if it would make a difference but try removing the {unwrap}{/unwrap} tags.

I dont know if it's a good solution but I commented out this lines
if ($ascii == '61') {
//                    $char = $escape . strtoupper(sprintf('s', dechex($ascii)));  // =3D
//                }

in Email library and it works fine...

Theme © iAndrew 2016 - Forum software by © MyBB