I have a blog and I want to send e-mail my subscribes when I published new post. I used django signals. My problem is that signal is not working. I can send mail when I try django shell.
This is my signals.py file :
from django.db.models.signals import post_save
from blog.models import Blog
from django.core.mail import send_mail
from django.dispatch import receiver
@receiver(post_save, sender=Blog)
def new_post_created(sender,**kwargs)
print "Success"
mysubject = "E mail gönderiyorum"
mymessage = "Merhaba, \nYeni yazım az önce yayınlandı. Hemen okumak için linki kullanabilirsin.\n http://www.cemreacar.com/blog/"
mymail = "mail@cemreacar.com"
send_mail(mysubject,mymessage,mymail,['*****@gmail.com'],'fail_silently=False')