CodeIgniter Forums

Full Version: Codeigniter email class issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]jacobson[/eluser]
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 :
Code:
$this->email->message($this->load->view('/email/activation_email', $data, TRUE));

Inside this view I have a content

Code:
<?php
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 /';
?&gt;
{unwrap}<a href='http://localhost/register/activate/$userid/$username'>Activation Link</a>{/unwrap}

I loaded the email class with my configuration array

Code:
$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:
Code:
< href=3D'http://localhos=
t/register/activate/6e3205c71cdf8df43156d68742b64a84/username'>

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

El Forum

[eluser]Rolly1971[/eluser]
maybe try writing like this:

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

El Forum

[eluser]jacobson[/eluser]
but with processing those variables is everything fine, the userid and username are correct.

El Forum

[eluser]Rolly1971[/eluser]
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.

El Forum

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

in Email library and it works fine...