Skip to content
Snippets Groups Projects
Commit a7386c90 authored by Daniel.Kalioudjoglou's avatar Daniel.Kalioudjoglou
Browse files

commenter l envoi de mail qui ne fonctionne pas

parent c201dbeb
Branches main
No related tags found
No related merge requests found
......@@ -52,24 +52,24 @@ supervision_new <- bind_rows(donnees_jour,supervision_old)
write.xlsx(supervision_new,"supervision/supervision.xlsx")
# -----------
# # envoi mail si 0 annonce
if(nb_new > 1 | nb_lines_new == 0){
library(gmailr)
gm_auth_configure(path = "X:/SCTE/CSD/APPLICATIONS_SIG_BUREAUTIQUES/RESSOURCES_R/client_secret_api_gmail_csd.json")
gm_auth()
test_email <-
gm_mime() %>%
gm_to(c("daniel.kalioudjoglou@developpement-durable.gouv.fr","Juliette.Engelaere@developpement-durable.gouv.fr","christelle.belkacem@developpement-durable.gouv.fr")) %>%
gm_from("csd.scte.dreal.pdl@gmail.com") %>%
gm_subject("Erreur chargement Siclop") %>%
gm_text_body("Une erreur est sans doute survenue dans le chargement des annonces. Vérifier le nombre d'annonces chargées dans le fichier joint") %>%
gm_attach_file("supervision/supervision.xlsx")
# Verify it looks correct
gm_create_draft(test_email)
# If all is good with your draft, then you can send it
gm_send_message(test_email)
}
# # # envoi mail si 0 annonce
#
# if(nb_new > 1 | nb_lines_new == 0){
# library(gmailr)
# gm_auth_configure(path = "X:/SCTE/CSD/APPLICATIONS_SIG_BUREAUTIQUES/RESSOURCES_R/client_secret_api_gmail_csd.json")
# gm_auth()
# test_email <-
# gm_mime() %>%
# gm_to(c("daniel.kalioudjoglou@developpement-durable.gouv.fr","Juliette.Engelaere@developpement-durable.gouv.fr","christelle.belkacem@developpement-durable.gouv.fr")) %>%
# gm_from("csd.scte.dreal.pdl@gmail.com") %>%
# gm_subject("Erreur chargement Siclop") %>%
# gm_text_body("Une erreur est sans doute survenue dans le chargement des annonces. Vérifier le nombre d'annonces chargées dans le fichier joint") %>%
# gm_attach_file("supervision/supervision.xlsx")
# # Verify it looks correct
# gm_create_draft(test_email)
# # If all is good with your draft, then you can send it
# gm_send_message(test_email)
# }
# -----------
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment