Revision: 1420 Author: sebastien.lelong Date: Sun Oct 25 12:38:59 2009 Log: sender header to avoid spam + fix encoding http://code.google.com/p/jallib/source/detail?r=1420
Modified: /trunk/tools/japp/japp_config.py.tpl /trunk/tools/japp/publish.py ======================================= --- /trunk/tools/japp/japp_config.py.tpl Thu Oct 22 22:57:34 2009 +++ /trunk/tools/japp/japp_config.py.tpl Sun Oct 25 12:38:59 2009 @@ -41,6 +41,12 @@ # mailhandler TO_ADDRESS="" +# "Sender" address. This must be set to an address known by +# account FROM_ADDRESS (eg. gmail), so email won't be detected +# as spam (this can occur if FROM_ADDRESS = TO_ADDRESS and +# no Sender) +SENDER_ADDRESS="" + # SMTP host/port used to send email SMTP_HOST="localhost" SMTP_PORT=25 ======================================= --- /trunk/tools/japp/publish.py Sun Oct 25 12:02:40 2009 +++ /trunk/tools/japp/publish.py Sun Oct 25 12:38:59 2009 @@ -26,14 +26,15 @@ dest = japp_config.TO_ADDRESS msg['From'] = me msg['To'] = dest +# This should avoid email being detected as spam... +msg['Sender'] = japp_config.SENDER_ADDRESS commands = """pass: %s path: content/%s -uid: 3 """ % (japp_config.FROM_PASSWD,path) -txt = MIMEText(commands + content) +txt = MIMEText(commands + content,_charset="utf8") msg.attach(txt) # Assume we know that the image files are all in PNG format --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
