CodeIgniter Forums
Codeigniter email class issue - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Codeigniter email class issue (/thread-43406.html)

Codeigniter email class issue - El Forum - 07-10-2011

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_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

Codeigniter email class issue - El Forum - 07-10-2011

maybe try writing like this:

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

Codeigniter email class issue - El Forum - 07-10-2011

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

Codeigniter email class issue - El Forum - 07-10-2011

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.

Codeigniter email class issue - El Forum - 07-11-2011

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...