What is it that everytime we upload on production site, some functions and codes are not working. But those bugs didn't appear in the development and in my local. It's very inconvenient. It happens many times.
It is supposed to send emails on both teacher and student. It was working on development site and localhost, but when sending on production site. It was only sending teachers and no errors have appear.
Also my question, is it really okay to send two different group of recipients.
Because in my condition, I have two "$sendmail->send();"
I'm thinking that maybe after it loops the teachers and send the email, it stop. But that's why I'm curious because it's working on development and localhost. Also on my production site, we have more than 200 students. Thanks for your fast response.
When you're sending more than the occasional email, you should use the smtp driver, and not PHP's build in mail or the sendmail driver. And if it's really bulk, consider using an external email delivery solution.
This is why Fuel supports configuration environments. Use an email.php config file in /config/development for your local testing (I personally use the noop driver in development, don't want to send anything out at all), and one in /config/production that is used on your production server.