Use a fully qualified path to the sendmail binary
authorMagnus Hagander <magnus@hagander.net>
Mon, 12 Dec 2011 15:01:45 +0000 (16:01 +0100)
committerMagnus Hagander <magnus@hagander.net>
Mon, 12 Dec 2011 15:01:45 +0000 (16:01 +0100)
For some reason, it appears to work fine without it when used from
inside django, but fails when the cronjobs use the same function.

pgweb/util/misc.py

index cac1a7d678bae0c51586e0153dcc6b108104959e..656d1f11cebb8d73de0a1aa8b305a48886dc7362 100644 (file)
@@ -6,7 +6,7 @@ from django.conf import settings
 from pgweb.util.helpers import template_to_string
 
 def sendmail(msg):
-       pipe = Popen("sendmail -t", shell=True, stdin=PIPE).stdin
+       pipe = Popen("/usr/sbin/sendmail -t", shell=True, stdin=PIPE).stdin
        pipe.write(msg.as_string())
        pipe.close()