[eluser]Neha[/eluser]
Hi,
I have installed swift api to send mails. But I am not getting customer mails to my personal mail address which I want. Here is my code
Code:
$smtp =& new Swift_Connection_SMTP("My domain ", );
$smtp->setUsername("username");
$smtp->setpassword("password");
$swift =& new Swift($smtp);
$fromAdd=new Swift_Address($email,"Name");
$message =& new Swift_Message("Message", $mail_body);
$swift->send($message, 'mypersonalmailId', $fromAdd);
I have also tried email class library to send mail but did not succeed.
here is the code using email class library
Code:
$this->load->library('email');
$config['protocol'] = 'sendmail';
$this->email->initialize($config);
$this->email->from($email, $name);
$this->email->to('mypersonalmail');
$this->email->subject('Subject');
$this->email->message('Message');
$this->email->send();
}
I have also tried two more options but did not succeed. I m newbie to CI.
Please help me in this matter.
Thanks in advance