Reputation: 83
I need to add an image signature in my email body, i write the message into a textarea and the variable $message don't send the image, just send text, and when i use an editable div instead textarea, the message get empty, here my code:
//Controller
$destino = $this->load->view("destino");
$asunto = $this->input->post("asunto");
$mensaje = $this->input->post("mensaje");
$this->email->set_newline("\r\n");
$this->email->from('[email protected]');
$this->email->to($destino);
$this->email->subject($asunto);
$this->email->message($mensaje);
//view message
<div class="col-md-9" style="float: right;">
<textarea id="editor" name="mensaje">
$this->load->view('firma');
</textarea>
Upvotes: 0
Views: 250
Reputation: 83
I found the way, just need add other variable $message but in the "=" need to add a dot before ".=", and the path of your signature image on the server:
$message .= '<img src=http://path/to_my/signature.png alt="My Firma"> <br>';
Upvotes: 1