Welcome Guest, Not a member yet? Register   Sign In
Load information into email message.
#1

[eluser]cdonate[/eluser]
Hy guys.

I need to send email messages that have some default text and some strings loaded into it, like $name and $last_name, something like this:

Code:
message = '
<br>
Dear '.$name.' '.$last_name.',<br>
<br>
Você está recebendo este e-mail pois esse endereço<br>
foi cadastrado para o projeto SINUS 2012.<br>
Se você não se registrou, por favor, desregarde esse email.<br>
<br>
...


The email message is hardcoded inside my controller, but I would like to put the email message into a text file and load it from the controller.

This is working OK, but the $name and $last_name don't get loaded, the message stays
Code:
Dear '.$name.' '.$last_name.',<br>
, the variables do not get changed.

Is there any way to do this? Load the email message from a file and have the variables chaged?

My email function is this:

Code:
function sendEmailConf($name,$last_name,$email){
  
$this->load->helper('file');
  
$message = read_file('./attachments/email_actv.txt');

Thanks!!!


Messages In This Thread
Load information into email message. - by El Forum - 01-21-2012, 04:34 PM
Load information into email message. - by El Forum - 01-21-2012, 05:10 PM
Load information into email message. - by El Forum - 01-21-2012, 08:00 PM
Load information into email message. - by El Forum - 01-21-2012, 08:19 PM
Load information into email message. - by El Forum - 01-22-2012, 05:47 AM
Load information into email message. - by El Forum - 01-22-2012, 09:23 AM
Load information into email message. - by El Forum - 04-03-2012, 02:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB