fujinet-firmware icon indicating copy to clipboard operation
fujinet-firmware copied to clipboard

Feature request: email printed files

Open sl0re10 opened this issue 2 years ago • 14 comments
trafficstars

HP printers have been coming with a dedicated email address that will print files emailed to it. Emailing printed files to a address could serve as de facto wireless printing.

For other printers, such as brother, phone printing is well supported. People can open emails on their phone and print attachments.

sl0re10 avatar Apr 09 '23 04:04 sl0re10

Wouldn't this mainly work for plain text files? As soon as you print out graphics, you would only receive gibberish. Or do you mean that the resulting PDF should be e-mailed to you instead?

fredlcore avatar Dec 19 '23 17:12 fredlcore

I would assume the resulting PDFs. The issue is that this feature relies on explicit configurations that don't exist for most people, anymore. This isn't 1999, and most people don't have their own SMTP server.

tschak909 avatar Dec 19 '23 18:12 tschak909

There are libraries that facilitate sending e-mails from the ESP32, such as this one here: https://github.com/mobizt/ESP-Mail-Client So you could even authenticate against a GMail account and send e-mails through their service. Configuration could be done via fnconfig.ini, right?

fredlcore avatar Dec 19 '23 18:12 fredlcore

sure.

tschak909 avatar Dec 19 '23 18:12 tschak909

I could look into that once I have my setup with a generic ESP32-WROVER working in conjunction with Altirra up and running, since I'm planning to get this one running as well, which is probably in the same area of the codebase: https://www.facebook.com/groups/fujinetusers/permalink/3597409807207336/?mibextid=uJjRxr But want to make sure that (at least the former) would be a desired feature, because otherwise I'd not invest time into it...

fredlcore avatar Dec 20 '23 02:12 fredlcore

Go for it. :)

-Thom

On Tue, Dec 19, 2023 at 8:04 PM fredlcore @.***> wrote:

I could look into that once I have my setup with a generic ESP32-WROVER working in conjunction with Altirra up and running, since I'm planning to get this one running as well, which is probably in the same area of the codebase:

https://www.facebook.com/groups/fujinetusers/permalink/3597409807207336/?mibextid=uJjRxr But want to make sure that (at least the former) would be a desired feature, because otherwise I'd not invest time into it...

— Reply to this email directly, view it on GitHub https://github.com/FujiNetWIFI/fujinet-platformio/issues/585#issuecomment-1863739194, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVBYZSWWILVGSKQI3MFOJ3YKJBT7AVCNFSM6AAAAAAWX4CB3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTG4ZTSMJZGQ . You are receiving this because you commented.Message ID: @.***>

tschak909 avatar Dec 20 '23 02:12 tschak909

Will do. I ran into my first problem already: When adding an external library (such as ESP-Mail-Client), the README.md in the /lib folder tells me to add it in that folder and call it like this: #include <ESP_Mail_Client.h>. However, when adding this include line for example in printer_emulator.cpp, I always get fatal error: ESP_Mail_Client.h: No such file or directory. Also adding it via PlatformIO's library manager leads to the same result. Is this a problem with the library or any other fault by me or did I just put it in the wrong place? Thanks for any pointers...

fredlcore avatar Dec 20 '23 13:12 fredlcore

Try using quotes and a relative path, using vs.code's completion to help.

-Thom

On Wed, Dec 20, 2023 at 7:36 AM fredlcore @.***> wrote:

Will do. I ran into my first problem already: When adding an external library (such as ESP-Mail-Client), the README.md in the /lib folder tells me to add it in that folder and call it like this: #include <ESP_Mail_Client.h>. However, when adding this include line for example in printer_emulator.cpp, I always get fatal error: ESP_Mail_Client.h: No such file or directory. Also adding it via PlatformIO's library manager leads to the same result. Is this a problem with the library or any other fault by me or did I just put it in the wrong place? Thanks for any pointers...

— Reply to this email directly, view it on GitHub https://github.com/FujiNetWIFI/fujinet-platformio/issues/585#issuecomment-1864486742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVBYZXJMUNQFH5DL3J3N3LYKLSXJAVCNFSM6AAAAAAWX4CB3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUGQ4DMNZUGI . You are receiving this because you commented.Message ID: @.***>

tschak909 avatar Dec 20 '23 14:12 tschak909

Hmm, using quotes and relative path finds the library and tries to compile it but then fails because #include <Arduino.h> cannot be found. I haven't worked on such large distributed projects before, but when I would normally add a library in platformio.ini under lib_deps, this library would be installed for this project and I could just include it using #include <lib.h>. However, this does not seem to work here, not sure why. Please don't bother if there is nothing obviously wrong on my side here, I can also just modify that library and adjust all paths to work, but if it should be as the README.md in /libs says, and this is not working for me here, I assume that I'm doing something wrong here...

fredlcore avatar Dec 20 '23 15:12 fredlcore

We don't use Ardiuno. We use ESP-IDF, so the library would need to be ported. -Thom

On Wed, Dec 20, 2023 at 9:06 AM fredlcore @.***> wrote:

Hmm, using quotes and relative path finds the library and tries to compile it but then fails because #include <Arduino.h> cannot be found. I haven't worked on such large distributed projects before, but when I would normally add a library in platformio.ini under lib_deps, this library would be installed for this project and I could just include it using #include <lib.h>. However, this does not seem to work here, not sure why. Please don't bother if there is nothing obviously wrong on my side here, I can also just modify that library and adjust all paths to work, but if it should be as the README.md in /libs says, and this is not working for me here, I assume that I'm doing something wrong here...

— Reply to this email directly, view it on GitHub https://github.com/FujiNetWIFI/fujinet-platformio/issues/585#issuecomment-1864632545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVBYZWVSN46IEGDIINGZKLYKL5H3AVCNFSM6AAAAAAWX4CB3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUGYZTENJUGU . You are receiving this because you commented.Message ID: @.***>

tschak909 avatar Dec 20 '23 15:12 tschak909

Sure, now things make sense ;). I'll see if that is doable...

fredlcore avatar Dec 20 '23 15:12 fredlcore

Last question for today: How is the project's approach towards external libraries? Have these been used at all or only the ones that come with the ESP-IDF framework? Because if libraries cannot included automatically as dependencies and thus have to be ported or otherwise modified, this means that any (potentially critical) update will only be possible if someone keeps track of any updated library versions and ports them accordingly, and this may not always (or at least continuously) be the case. I've been doing this for my project, but these were rather uncritical libs. Just want to make sure that this won't be an issue here.

fredlcore avatar Dec 20 '23 15:12 fredlcore

We have indeed used external libraries:

  • EdURLParser
  • libssh2
  • samlib

and others.

We have a get it done philosophy.

-Thom

On Wed, Dec 20, 2023 at 9:55 AM fredlcore @.***> wrote:

Last question for today: How is the project's approach towards external libraries? Have these been used at all or only the ones that come with the ESP-IDF framework? Because if libraries cannot included automatically as dependencies and thus have to be ported or otherwise modified, this means that any (potentially critical) update will only be possible if someone keeps track of any updated library versions and ports them accordingly, and this may not always (or at least continuously) be the case. I've been doing this for my project, but these were rather uncritical libs. Just want to make sure that this won't be an issue here.

— Reply to this email directly, view it on GitHub https://github.com/FujiNetWIFI/fujinet-platformio/issues/585#issuecomment-1864728814, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVBYZQABADXO5A36GGHVHDYKMC6VAVCNFSM6AAAAAAWX4CB3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUG4ZDQOBRGQ . You are receiving this because you commented.Message ID: @.***>

tschak909 avatar Dec 20 '23 15:12 tschak909

Great, thanks :)

fredlcore avatar Dec 20 '23 16:12 fredlcore