Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
py12306
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
python
py12306
Commits
0c14ebd0
Commit
0c14ebd0
authored
Jan 12, 2019
by
Jalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复邮件发送者错误
parent
845f3032
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
notification.py
py12306/helpers/notification.py
+3
-3
No files found.
py12306/helpers/notification.py
View file @
0c14ebd0
...
@@ -65,7 +65,7 @@ class Notification():
...
@@ -65,7 +65,7 @@ class Notification():
to
=
to
if
isinstance
(
to
,
list
)
else
[
to
]
to
=
to
if
isinstance
(
to
,
list
)
else
[
to
]
message
=
EmailMessage
()
message
=
EmailMessage
()
message
[
'Subject'
]
=
title
message
[
'Subject'
]
=
title
message
[
'From'
]
=
'service@pjialin.com'
message
[
'From'
]
=
Config
()
.
EMAIL_SENDER
message
[
'To'
]
=
to
message
[
'To'
]
=
to
message
.
set_content
(
content
)
message
.
set_content
(
content
)
try
:
try
:
...
@@ -79,7 +79,7 @@ class Notification():
...
@@ -79,7 +79,7 @@ class Notification():
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
name
=
'张三
3
'
name
=
'张三
4
'
content
=
'你的车票 广州 到 深圳 购买成功,请登录 12306 进行支付'
content
=
'你的车票 广州 到 深圳 购买成功,请登录 12306 进行支付'
# Notification.voice_code('13800138000', name, content)
# Notification.voice_code('13800138000', name, content)
Notification
.
send_email
(
'
admin@pjialin
.com'
,
name
,
content
)
Notification
.
send_email
(
'
user@email
.com'
,
name
,
content
)
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