i cannot get "'fileit/static/images/pending.png' " working.
I get
<type 'exceptions.IOError'> [Errno 2] No such file or directory:
'fileit/static/images/pending.png'Versão
web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
Python Python 2.7.5: /home/ramstein74/webapps/new2py/bin/uwsgi (prefix:
/usr)Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.

Traceback (most recent call last):
  File "/home/ramstein74/webapps/new2py/web2py/gluon/restricted.py",
line 227, in restricted
    exec ccode in environment
  File 
"/home/ramstein74/webapps/new2py/web2py/applications/fileit/controllers/default.py"
<https://docs.cires.pt/admin/default/edit/fileit/controllers/default.py>,
line 854, in <module>
  File "/home/ramstein74/webapps/new2py/web2py/gluon/globals.py", line
417, in <lambda>
    self._caller = lambda f: f()
  File 
"/home/ramstein74/webapps/new2py/web2py/applications/fileit/controllers/default.py"
<https://docs.cires.pt/admin/default/edit/fileit/controllers/default.py>,
line 333, in execdal
    attachments = mail.Attachment('fileit/static/images/pending.png',
content_id='photo'))
  File "/home/ramstein74/webapps/new2py/web2py/gluon/tools.py", line
244, in __init__
    payload = read_file(payload, 'rb')
  File "/home/ramstein74/webapps/new2py/web2py/gluon/fileutils.py",
line 103, in read_file
    f = open(filename, mode)
IOError: [Errno 2] No such file or directory: 'fileit/static/images/pending.png'


i wrote
mail.Attachment('/fileit/static/images/pending.png', content_id='photo'))
i have a pending.png in static/images/

Thank you


2018-06-04 14:13 GMT+01:00 Leonel Câmara <[email protected]>:

> 3D is the hex for 61 which is the ascii table position for "=". So that's
> normal in quoted-printable where a character is encoded by = followed by
> the hex.
>
> Base64 images are simply not well supported by many email clients. You
> should use cid and put the images in attachments which works correctly
> everywhere. Like this example in the book:
>
>
>
> mail.send('[email protected]',
>  'Message subject',
>  '<html><img src="cid:photo" /></html>',
>  attachments = mail.Attachment('/path/to/photo.jpg', content_id='photo'))
>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to