Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Siclop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DREAL Pays de la Loire
Centre de Services de la Donnée
Siclop
Commits
a7386c90
Commit
a7386c90
authored
1 year ago
by
Daniel.Kalioudjoglou
Browse files
Options
Downloads
Patches
Plain Diff
commenter l envoi de mail qui ne fonctionne pas
parent
c201dbeb
Branches
main
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/OF-miseajour.R
+18
-18
18 additions, 18 deletions
scripts/OF-miseajour.R
supervision/supervision.xlsx
+0
-0
0 additions, 0 deletions
supervision/supervision.xlsx
with
18 additions
and
18 deletions
scripts/OF-miseajour.R
+
18
−
18
View file @
a7386c90
...
...
@@ -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)
#
}
# -----------
...
...
This diff is collapsed.
Click to expand it.
supervision/supervision.xlsx
+
0
−
0
View file @
a7386c90
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment