diff options
Diffstat (limited to 'src/AppBundle/Utils/EmailSender.php')
| -rw-r--r-- | src/AppBundle/Utils/EmailSender.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/AppBundle/Utils/EmailSender.php b/src/AppBundle/Utils/EmailSender.php index e6f74c2..c23f68f 100644 --- a/src/AppBundle/Utils/EmailSender.php +++ b/src/AppBundle/Utils/EmailSender.php @@ -10,12 +10,61 @@ namespace AppBundle\Utils; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use AppBundle\Utils\Aqi; use Swift_SmtpTransport; use Swift_Mailer; use Swift_Message; class EmailSender extends Controller { + public function main() + { + $data = $this->getData(); + if(160 >= 151) $this->sendEmail($data); + sleep(3600); + } + + public function getData() + { + $table = array( + 'Co' => array('breakpoints' => [0, 4.4, 4.5, 9.4, 9.5, 12.4, 12.5, 15.4, 15.5, 30.4, 30.5, 40.4, 40.5, 50.4], + 'aq' => [0, 50, 51, 100, 101, 150, |