title: django send email with celery task
body: <p>I want to send an email to a user with order.id and &quot;manu_date&quot; of a specific order automatically if the deadline of the order is today. I have already configured celery with rabbitmq and it's working and I'm able to send emails. The problem is I don't know what will go into the tasks and views. So far for the task I have came up with the code below.</p>
  <pre><code>@periodic_task(run_every=datetime.timedelta(minutes=1))  
  def check_for_orders():      
      orders = Order.objects.all()
      now = datetime.datetime.utcnow().replace(tzinfo=utc,second=00, microsecond=00)
      for order in orders:
          if order.manu_date == now:
              send_mail('Manufacturing Reminder',
                  '{{Order.id}} is due {{manu_date}}',
                  'dummyguy1680@gmail.com',
                  ['gummy@gmail.com.com'])
              return None
  
  </code></pre>
  <pre><code>
  class Order(models.Model):
      date = models.ForeignKey('date', null=True, on_delete=models.CASCADE)
      user = models.ForeignKey(User, null=True, on_delete=models.CASCADE)
      name = models.CharField(max_length=30)
      date_created = models.DateTimeField('date_created', default=timezone.now(), blank=False)
      manu_date = models.DateField('Manufacturing', null=True)
      updated_by = models.ForeignKey(User, null=True, related_name='updated_by_user', on_delete=models.CASCADE)
      date_updated = models.DateField(max_length=100, null=True)
  
  </code></pre>