Hi.
I'm have a problem.
final public function send_order_to_email($id_order, $email, &$body, $file_attach = null)
{
$this->load->library('email');
$this->email->initialize(array(
'useragent' => 'useragent',
'mailtype' => 'html',
'validate' => true
));
$this->email->from('no-reply@site.info', 'useragent');
$this->email->to($email);
$this->email->subject('Order №' . $id_order);
$this->email->message($body);
if (!is_null($file_attach)) {
$this->email->attach($file_attach, 'attachment', 'invoice_' . $id_order . '.pdf');
}
return (bool)$this->email->send();
}
WHERE:
$file_attach= base_url( ' /email/attch/myfile.pdf ' ); (file is present on server)
$email = myemail@email.info
Problem: on local server - code works fine. On hoster's server - letters to the email come, but file size is 0 bytes
I'm have a problem.
final public function send_order_to_email($id_order, $email, &$body, $file_attach = null)
{
$this->load->library('email');
$this->email->initialize(array(
'useragent' => 'useragent',
'mailtype' => 'html',
'validate' => true
));
$this->email->from('no-reply@site.info', 'useragent');
$this->email->to($email);
$this->email->subject('Order №' . $id_order);
$this->email->message($body);
if (!is_null($file_attach)) {
$this->email->attach($file_attach, 'attachment', 'invoice_' . $id_order . '.pdf');
}
return (bool)$this->email->send();
}
WHERE:
$file_attach= base_url( ' /email/attch/myfile.pdf ' ); (file is present on server)
$email = myemail@email.info
Problem: on local server - code works fine. On hoster's server - letters to the email come, but file size is 0 bytes