EMail distribution list – more than one recipient

Home Forums The libraries hosted on the site EMailSender send email with attachments EMail distribution list – more than one recipient

Viewing 4 reply threads
  • Author
    Posts
    • #6382
      Mauro

        Buongiorno Renzo,

        It works perfectly but your library allows me to send an email to one recipient only.

        EMailSender::Response resp = emailSend.send(to_email_address, message);

        Is any way to send the same email to more than 1 email address?

        Can I create a bunch of strings, each one containing the email addresses and then one by one convert them to fit the to_email_address requirements?

        Grazie,

        Mauro

         

         

      • #6390
        Renzo Mischianti
        Keymaster

          Hi Mauro,

          sorry if I response so late, but I have a lot of think to follow…

          I implement multiple recipient, you can find a beta version on branch

          Github

          You can use like so, to sent do 3 email

          
              EMailSender::EMailMessage message;
              message.subject = "Soggetto";
              message.message = "Ciao come stai
          io bene.
          www.mischianti.org";
          
              const char* arrayOfEmail[] = {"mischianti@gmail.com", "smtp.mischianti@gmail.com", "renzo.mischianti@gmail.com"};
              EMailSender::Response resp = emailSend.send(arrayOfEmail, 3, message);
          

          or to send to 2 email as principal and 1 as CC

          
              EMailSender::EMailMessage message;
              message.subject = "Soggetto";
              message.message = "Ciao come stai
          io bene.
          www.mischianti.org";
          
              const char* arrayOfEmail[] = {"mischianti@gmail.com", "smtp.mischianti@gmail.com", "renzo.mischianti@gmail.com"};
              EMailSender::Response resp = emailSend.send(arrayOfEmail, 2, 1, message);
          
          

          or to sent first to principal one to cc and one to CCn

          
              EMailSender::EMailMessage message;
              message.subject = "Soggetto";
              message.message = "Ciao come stai
          io bene.
          www.mischianti.org";
          
              const char* arrayOfEmail[] = {"mischianti@gmail.com", "smtp.mischianti@gmail.com", "renzo.mischianti@gmail.com"};
              EMailSender::Response resp = emailSend.send(arrayOfEmail, 1, 1, 1, message);
          
          

          Give me a feedback…

          Bye Renzo

        • #6448
          Mauro

            Renzo,

            I should say THANK YOU (grazie mille) for your fast reply and implementation.

            Tried your beta, it fits my needs.  PERFECT!  No problem so far.

            I need to be careful matching the number of Recipients, CC and ccN otherwise all sketch goes belly!  Very chatty but it is a beta after all.

            Mauro

          • #6457
            Renzo Mischianti
            Keymaster

              Hi Mauro,

              to remove debug message you must comment this line

              #define EMAIL_SENDER_DEBUG

              If you have a better think about the structure write here without problem.

               

              Bye Renzo

               

               

            • #6575
              Renzo Mischianti
              Keymaster

                Hi Mauro,

                now the library with this features is in the official branch, and released on Arduino Library manager.

                 

                Bye Renzo

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