Hello,
In this example that works fine, just a warning:
In file included from C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\__sources\esp32 s2\avecEmailsenderSpiffs2\avecEmailsenderSpiffs2.ino:17:In file included from C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\__sources\esp32 s2\avecEmailsenderSpiffs2\avecEmailsenderSpiffs2.ino:17:Infile included from C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\__sources\esp32 s2\avecEmailsenderSpiffs2\avecEmailsenderSpiffs2.ino:17:C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\libraries\EMailSender/EMailSender.h:222: warning: "EMAIL_NETWORK_CLASS" redefined#define EMAIL_NETWORK_CLASS EMAIL_NETWORK_SSL_CLASS' #define EMAIL_NETWORK_CLASS EMAIL_NETWORK_SSL_CLASS
In file included from C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\__sources\esp32 s2\avecEmailsenderSpiffs2\avecEmailsenderSpiffs2.ino:17:C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\libraries\EMailSender/EMailSender.h:165: note: this is the location of the previous definition#define EMAIL_NETWORK_CLASS WiFiClient
`
Hello, In this example that works fine, just a warning:
In file included from C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\__sources\esp32 s2\avecEmailsenderSpiffs2\avecEmailsenderSpiffs2.ino:17:
In file included from C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\__sources\esp32 s2\avecEmailsenderSpiffs2\avecEmailsenderSpiffs2.ino:17:
Infile included from C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\__sources\esp32 s2\avecEmailsenderSpiffs2\avecEmailsenderSpiffs2.ino:17:
C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\libraries\EMailSender/EMailSender.h:222: warning: "EMAIL_NETWORK_CLASS" redefined
#define EMAIL_NETWORK_CLASS EMAIL_NETWORK_SSL_CLASS' #define EMAIL_NETWORK_CLASS EMAIL_NETWORK_SSL_CLASS
In file included from C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\__sources\esp32 s2\avecEmailsenderSpiffs2\avecEmailsenderSpiffs2.ino:17:
C:\Users\admin\Desktop\arduino-1.8.18\portable\sketchbook\libraries\EMailSender/EMailSender.h:165: note: this is the location of the previous definition
#define EMAIL_NETWORK_CLASS WiFiClient
`if I replace the following part :
EMailSender::EMailMessage message; message.subject = "Fichier "; message.message = "Utilisation ";
EMailSender::FileDescriptior fileDescriptor[3];
fileDescriptor[2].filename = F("parcours36.gpx");
fileDescriptor[2].url = F("/parcours36.gpx");
fileDescriptor[2].storageType = EMailSender::EMAIL_STORAGE_TYPE_SPIFFS;
fileDescriptor[2].mime = MIME_TEXT_PLAIN;
by this one: compilation without problem, sending the email BUT no attached files
byte nb=3;
EMailSender::EMailMessage message;
message.subject = "3 Fichiers gpx";
message.message = "Utilisation de MyTracker ";
EMailSender::FileDescriptior fileDescriptor[nb];
byte boucle=3;
String nomfichier;
while ( boucle > 0){
nomfichier = String( "parcours" + String(boucle) + ".gpx");
char __dataFileName[sizeof(nomfichier)];
nomfichier.toCharArray(__dataFileName, sizeof(__dataFileName));
fileDescriptor[boucle].filename = F(__dataFileName);
nomfichier = String( "/" + nomfichier );
__dataFileName[sizeof(nomfichier)];
nomfichier.toCharArray(__dataFileName, sizeof(__dataFileName));
fileDescriptor[boucle].url = F(__dataFileName);
fileDescriptor[boucle].storageType = EMailSender::EMAIL_STORAGE_TYPE_SPIFFS;
fileDescriptor[boucle].mime = MIME_TEXT_PLAIN;
Serial.print(" nomfichier : "); Serial.print(nomfichier);
Serial.print(" boucle : "); Serial.println(boucle );
boucle -- ; }
EMailSender::Attachments attachs = {boucle, fileDescriptor};