• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not getting mails

#1
[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

#2
[eluser]Neha[/eluser]
Hi,

Is there anyone who can help me please.

Thanks
Neha

#3
[eluser]Simian Studios[/eluser]
Few things to check:
* Do you DEFINITELY have the correct email settings for your server? Check them all twice as they are easy to get wrong, especially as some hosting companies have weird setups.
* Have you tried using "echo $this->email->print_debugger();" to see what that says?
* What provider is your personal email address on? It may be that the emails are being sent fine, but they're being blocked by your mail provider.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.