On Friday, October 21, 2022 at 8:59:43 AM UTC-7 Ramos wrote: > Coding like in the manual > > mail.send('y...@example.com', > 'Message subject', > '<html><img src="cid:photo" /></html>', > attachments = mail.Attachment('/path/to/photo.jpg', content_id='photo')) > > > > all the images appear at the bottom of the email as attachments like this > ( anexos means attachments!) > [image: image.png] > > > > how do i prevent this because its not nice to see them as attachments > besides the <html><img src="cid:photo" /></html>' > > regards > António > > This is a MIME question. The Mail class (and it's private class Attachment) are in tool.py, but import MIME stuff from _compat.py to handle python3 vs 2 issues. A quick scan of tool.py suggests that it is just a MIME multipart.
My inbox shows that some professional (as in, used by banks and other large commercial entities) will show the photos as attachments, and some don't. I would recommended studying both MIME itself and some samples of email to find out how that difference occurs. /dps -- 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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/1aafdee5-5fb5-4e16-8975-deb9fb253345n%40googlegroups.com.