Welcome Guest, Not a member yet? Register   Sign In
email sending issue
#5

Well, that could be a multitude of reasons.

Here are a few to check.

1. Are you actually getting an email address back from your model call?
If not, then the email will not send. Echo the output to a view as a test that you are getting the data you expected.

2. Can you send emails?
Hard code an email address, and send yourself an email. Did that work? If not, then the problem might be in your email configuration.

3. Where are you working?
On a local host sending emails from Xampp or similar will require additional configuration with your apache emulator to work. It can be notoriously difficult and fiddly (if it does not just work straight away). If on a live server, then ideally you should send emails form via SMTP using a real email address. Otherwise your emails could easily all go straight in the spam folder.


By the way,
PHP Code:
if($query->num_rows() > 0
{
 
    foreach ($query->result() as $row)
 
    {
 
         $data[] = $row;
 
    }


Can just be written as
PHP Code:
if($query->num_rows() > 0
{
 
    $data $query->result_array();

Reply


Messages In This Thread
email sending issue - by greenarrow - 08-19-2016, 11:36 AM
RE: email sending issue - by PaulD - 08-19-2016, 12:45 PM
RE: email sending issue - by greenarrow - 08-19-2016, 09:05 PM
RE: email sending issue - by Wouter60 - 08-19-2016, 12:48 PM
RE: email sending issue - by PaulD - 08-19-2016, 09:39 PM
RE: email sending issue - by greenarrow - 08-19-2016, 09:47 PM
RE: email sending issue - by PaulD - 08-19-2016, 10:00 PM
RE: email sending issue - by Wouter60 - 08-20-2016, 12:00 AM
RE: email sending issue - by InsiteFX - 08-20-2016, 03:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB