emailsender with SD : why?

Home Forums esp32 emailsender with SD : why?

Viewing 3 reply threads
  • Author
    Posts
    • #17613
      fr
      Participant

        Hello,

        I am very happy with the emailsender library to use with Spiffs but since I have a lot of files I need an SD card what should I do?
        In addition for later I would like to use emailsender with an esp32-S2: will this be possible?
        cordially

      • #17614
        Renzo Mischianti
        Keymaster

          Hi fr,
          yes, SD was supported, you can follow the instructions on this article
          Send email with attachments (EMailSender v2.x library): esp32 and esp8266 – 2

          I don’t test s2, I’ll do that test soon.

          Bye Renzo

        • #17616
          fr
          Participant

            Thank you for responding to me so quickly.
            The link is precisely the one that allowed me to test with spiffs.
            But there is no example of using SD
            My level allows me to manage the initialization of the SD but what to put in place of

            fileDescriptor[0].storageType = EMailSender::EMAIL_STORAGE_TYPE_SPIFFS;

            An full example please !

          • #17618
            Renzo Mischianti
            Keymaster

              Hi,
              here an example

              
              EMailSender::FileDescriptior fileDescriptor[2];
              fileDescriptor[1].filename = F("test.txt");
              fileDescriptor[1].url = F("/test.txt");
              fileDescriptor[1].storageType = EMailSender::EMAIL_STORAGE_TYPE_SD;
               
              fileDescriptor[0].filename = F("logo.jpg");
              fileDescriptor[0].url = F("/logo.jpg");
              fileDescriptor[0].mime = "image/jpg";
              fileDescriptor[0].encode64 = true;
              fileDescriptor[0].storageType = EMailSender::EMAIL_STORAGE_TYPE_SD;
               
              EMailSender::Attachments attachs = {2, fileDescriptor};
               
              EMailSender::Response resp = emailSend.send("<receipe@gmail.com>", message, attachs);
              

              Bye Renzo

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.
          Exit mobile version