07-16-2016, 05:53 PM
I have now been able to send emails OK.
How ever when I revive them they do not show my new lines its just in all one line
How do I make sure it displays the correct format.
Config > email.php
How ever when I revive them they do not show my new lines its just in all one line
How do I make sure it displays the correct format.
PHP Code:
$this->load->library('email');
$this->load->model('catalog/account/register_model');
$this->email->from('********', 'Admin');
$this->email->to($this->input->post('email'));
$this->email->subject('Customer Activation');
$key = md5(microtime().rand());
$message = "Thank you for creating a free account!";
$message .= "\r\n";
$message .= "Click on link to validate your email";
$message .= "\r\n";
$message .= anchor('account/register/validated/' . $key, 'Click Here To Validate Email');
$this->email->message($message);
if ($this->register_model->create_temp_account($key)) {
$this->email->send();
$data['success'] = '';
$data['header'] = Modules::run('catalog/common/header/index');
$data['footer'] = Modules::run('catalog/common/footer/index');
$this->load->view('account/register_view', $data);
}
Config > email.php
PHP Code:
<?php
$config['smtp_host'] = 'ssl://smtp.gmail.com';
$config['smtp_port'] = 465;
$config['smtp_user'] = '****';
$config['smtp_pass'] = '****';
$config['protocol'] = 'smtp';
$config['validate'] = true;
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!