Skip to content

smtp2mqtt home assistant #1

@MapiRafa

Description

@MapiRafa

Good evening, I need help, I’ve been trying for a long time but I can’t get the images from my camera to publish on mqtt… With PowerShell Test I can publish but when my camera send image email I get the following error:

2024-03-21 23:16:02,254 - smtp2mqtt - DEBUG - d397f285 - SKIP publish attachment data 2024-03-21 23:16:02,255 - smtp2mqtt - INFO - d397f285 - Saving attachment to /share/smtp2mqtt/test@test.com/d397f285_6129747_2024032123160201.jpg 2024-03-21 23:16:02,261 - smtp2mqtt - DEBUG - d397f285 - SKIP publish attachment data 2024-03-21 23:16:02,261 - smtp2mqtt - INFO - d397f285 - Saving attachment to /share/smtp2mqtt/test@test.com/d397f285_None (‘192.168.1.11’, 46242) SMTP session exception Traceback (most recent call last): File “/usr/lib/python3.10/site-packages/aiosmtpd/smtp.py”, line 741, in _handle_client await method(arg) File “/usr/lib/python3.10/site-packages/aiosmtpd/smtp.py”, line 1460, in smtp_DATA status = await self._call_handler_hook(‘DATA’) File “/usr/lib/python3.10/site-packages/aiosmtpd/smtp.py”, line 473, in _call_handler_hook status = await hook(self, self.session, self.envelope, *args) File “/app/smtp2mqtt.py”, line 127, in handle_DATA f.write(attachment.get_content()) TypeError: a bytes-like object is required, not ‘str’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions