Assistance with mail

26 views
Skip to first unread message

david white

unread,
Jan 1, 2014, 12:36:45 AM1/1/14
to codei...@googlegroups.com
My problem the mail in the application is send but when send the receiver email only have the subject and message . How may allow them to see the from address
please i need assistance
[code]
// For Resend activation link for user.
function resenduser($id)
{
$headers  = "From: utechreport\r\n";
    $headers .= "Content-type: text/html\r\n"; 
$user = $this->ion_auth->user($id)->row();
$to = $user->email;
$subject = "Mysba - Account Activation";
$message = "welcome to Mysba ,";
$message.= "<br>Please Click on <a href='http://utechreport.comeze.com/auth/activateresend/".$id."'>this link</a> to Activate your Account,";
//echo $message;
// var_dump(mail($to,$subject,$message,$headers));
mail($to,$subject,$message,$headers);
$this->session->set_flashdata('message', "Activation Link Sent Sucessfully");
redirect("auth", 'refresh');
//exit;
}
function activateresend($id, $code=false)
{


$activation = $this->ion_auth->activate($id, $code);

if ($activation)
{
//redirect them to the auth page
$this->session->set_flashdata('message', "Your Account Activated Sucessfully");
redirect("auth/login", 'refresh');
}else{
$this->session->set_flashdata('message', "Your Account Is Already Active");
redirect("auth/login", 'refresh');
}
}

}


[/code]

porquero

unread,
Jan 1, 2014, 7:42:07 PM1/1/14
to codei...@googlegroups.com
Is better that you use Email Class to do it: http://ellislab.com/codeigniter/user-guide/libraries/email.html
Is more clear to use and extend it.
Reply all
Reply to author
Forward
0 new messages