Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
weather_report
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vipul.v
weather_report
Commits
238b37a3
Commit
238b37a3
authored
Mar 20, 2023
by
vipul.v
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first
parent
e1bc3832
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
script/core/handler/send_email.py
script/core/handler/send_email.py
+0
-4
No files found.
script/core/handler/send_email.py
View file @
238b37a3
...
@@ -17,17 +17,13 @@ class SendEmail:
...
@@ -17,17 +17,13 @@ class SendEmail:
for
file_read
in
files
:
for
file_read
in
files
:
with
open
(
file_read
,
"rb"
)
as
file
:
with
open
(
file_read
,
"rb"
)
as
file
:
print
(
"sjsjhj"
)
file_data
=
file
.
read
()
file_data
=
file
.
read
()
file_name
=
file
.
name
file_name
=
file
.
name
print
(
file_name
)
print
(
file_name
)
# part['Content-Disposition'] = 'attachment; filename="%s"' % basename(f)
msg
.
add_attachment
(
file_data
,
maintype
=
"application"
,
subtype
=
"xlsx"
,
filename
=
file_name
)
msg
.
add_attachment
(
file_data
,
maintype
=
"application"
,
subtype
=
"xlsx"
,
filename
=
file_name
)
with
smtplib
.
SMTP_SSL
(
'smtp.gmail.com'
,
465
,
context
=
context
)
as
smtp
:
with
smtplib
.
SMTP_SSL
(
'smtp.gmail.com'
,
465
,
context
=
context
)
as
smtp
:
print
(
"skfknk"
)
smtp
.
login
(
sender_email
,
sender_password
)
smtp
.
login
(
sender_email
,
sender_password
)
smtp
.
sendmail
(
sender_email
,
receiver
,
msg
.
as_string
())
smtp
.
sendmail
(
sender_email
,
receiver
,
msg
.
as_string
())
# smtp.starttls()
except
ValueError
:
except
ValueError
:
raise
ValueError
raise
ValueError
except
Exception
as
e
:
except
Exception
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment