Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def send_mail(self, book_text):
- ts = time.time()
- date = datetime.datetime.fromtimestamp(ts).strftime('%Y%m%d')
- book_title = 'Update' + date + '.txt'
- mail.send_mail(sender="my_gmail_addr@gmail.com",
- to="my_kindle_addr@kindle.com",
- subject="convert",
- body="",
- attachments=[(book_title, book_text)])
- version: 1
- runtime: python27
- api_version: 1
- threadsafe: true
- handlers:
- - url: /update
- script: update.app
- login: admin
- cron:
- - description: daily update
- url: /update
- schedule: every day 18:00
- timezone: America/Indiana/Vevay
- mail.send_mail(sender="my_gmail_addr@gmail.com",
- to="my_kindle_addr@kindle.com",
- subject="convert",
- body=book_title,
- attachments=[(book_title, book_text)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement