Commit f58db26b by zhangjingdong

测试服务器发送邮件1

parent d558cffc
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</component> </component>
<component name="CoverageDataManager"> <component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/bihe_interface_test$hebin.coverage" NAME="hebin Coverage Results" MODIFIED="1547019882690" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/碧合app" /> <SUITE FILE_PATH="coverage/bihe_interface_test$hebin.coverage" NAME="hebin Coverage Results" MODIFIED="1547019882690" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/碧合app" />
<SUITE FILE_PATH="coverage/bihe_interface_test$execute_automation_scripts.coverage" NAME="execute_automation_scripts Coverage Results" MODIFIED="1547434463013" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/碧合app" /> <SUITE FILE_PATH="coverage/bihe_interface_test$execute_automation_scripts.coverage" NAME="execute_automation_scripts Coverage Results" MODIFIED="1547434572502" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/碧合app" />
</component> </component>
<component name="FavoritesManager"> <component name="FavoritesManager">
<favorites_list name="bihe_interface_test" /> <favorites_list name="bihe_interface_test" />
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
<file leaf-file-name="execute_automation_scripts.py" pinned="false" current-in-tab="true"> <file leaf-file-name="execute_automation_scripts.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py"> <entry file="file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-743"> <state relative-caret-position="237">
<caret line="14" column="35" selection-start-line="14" selection-start-column="35" selection-end-line="14" selection-end-column="35" /> <caret line="48" column="41" selection-start-line="48" selection-start-column="41" selection-end-line="48" selection-end-column="41" />
<folding> <folding>
<element signature="e#19#30#0" expanded="true" /> <element signature="e#19#30#0" expanded="true" />
<marker date="1547434480403" expanded="true" signature="2655:3690" ph="..." /> <marker date="1547434571083" expanded="true" signature="2640:3675" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -369,7 +369,7 @@ ...@@ -369,7 +369,7 @@
<caret line="10" column="49" lean-forward="true" selection-start-line="10" selection-start-column="49" selection-end-line="10" selection-end-column="49" /> <caret line="10" column="49" lean-forward="true" selection-start-line="10" selection-start-column="49" selection-end-line="10" selection-end-column="49" />
<folding> <folding>
<element signature="e#19#30#0" expanded="true" /> <element signature="e#19#30#0" expanded="true" />
<marker date="1547434480403" expanded="true" signature="2655:3690" ph="..." /> <marker date="1547434571083" expanded="true" signature="2640:3675" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
<caret line="11" column="49" lean-forward="true" selection-start-line="11" selection-start-column="49" selection-end-line="11" selection-end-column="49" /> <caret line="11" column="49" lean-forward="true" selection-start-line="11" selection-start-column="49" selection-end-line="11" selection-end-column="49" />
<folding> <folding>
<element signature="e#19#30#0" expanded="true" /> <element signature="e#19#30#0" expanded="true" />
<marker date="1547434480403" expanded="true" signature="2655:3690" ph="..." /> <marker date="1547434571083" expanded="true" signature="2640:3675" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -439,7 +439,7 @@ ...@@ -439,7 +439,7 @@
<caret line="15" column="32" lean-forward="true" selection-start-line="15" selection-start-column="32" selection-end-line="15" selection-end-column="32" /> <caret line="15" column="32" lean-forward="true" selection-start-line="15" selection-start-column="32" selection-end-line="15" selection-end-column="32" />
<folding> <folding>
<element signature="e#19#30#0" expanded="true" /> <element signature="e#19#30#0" expanded="true" />
<marker date="1547434480403" expanded="true" signature="2655:3690" ph="..." /> <marker date="1547434571083" expanded="true" signature="2640:3675" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -457,7 +457,7 @@ ...@@ -457,7 +457,7 @@
<caret line="14" column="25" selection-start-line="14" selection-start-column="25" selection-end-line="14" selection-end-column="25" /> <caret line="14" column="25" selection-start-line="14" selection-start-column="25" selection-end-line="14" selection-end-column="25" />
<folding> <folding>
<element signature="e#19#30#0" expanded="true" /> <element signature="e#19#30#0" expanded="true" />
<marker date="1547434480403" expanded="true" signature="2655:3690" ph="..." /> <marker date="1547434571083" expanded="true" signature="2640:3675" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -480,7 +480,7 @@ ...@@ -480,7 +480,7 @@
<caret line="8" column="8" lean-forward="true" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" /> <caret line="8" column="8" lean-forward="true" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" />
<folding> <folding>
<element signature="e#19#30#0" expanded="true" /> <element signature="e#19#30#0" expanded="true" />
<marker date="1547434480403" expanded="true" signature="2655:3690" ph="..." /> <marker date="1547434571083" expanded="true" signature="2640:3675" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -589,11 +589,11 @@ ...@@ -589,11 +589,11 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py"> <entry file="file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-743"> <state relative-caret-position="237">
<caret line="14" column="35" selection-start-line="14" selection-start-column="35" selection-end-line="14" selection-end-column="35" /> <caret line="48" column="41" selection-start-line="48" selection-start-column="41" selection-end-line="48" selection-end-column="41" />
<folding> <folding>
<element signature="e#19#30#0" expanded="true" /> <element signature="e#19#30#0" expanded="true" />
<marker date="1547434480403" expanded="true" signature="2655:3690" ph="..." /> <marker date="1547434571083" expanded="true" signature="2640:3675" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
......
# coding = utf-8 # coding = utf-8
...@@ -44,8 +44,8 @@ class PostmanApi(): ...@@ -44,8 +44,8 @@ class PostmanApi():
message['From'] =Header("测试环境接口自动化测试") message['From'] =Header("测试环境接口自动化测试")
message['Subject'] = Header(years+at_the+"自动化测试结果",'utf-8') message['Subject'] = Header(years+at_the+"自动化测试结果",'utf-8')
try: try:
smtpObj = smtplib.SMTP_SSL(mail_host,465) smtpObj = smtplib.SMTP_SSL()
# smtpObj.connect(mail_host,587 ) # 25 为 SMTP 端口号 smtpObj.connect(mail_host,465 ) # 25 为 SMTP 端口号
smtpObj.login(mail_user, mail_pass) smtpObj.login(mail_user, mail_pass)
smtpObj.sendmail(sender, receivers, message.as_string()) smtpObj.sendmail(sender, receivers, message.as_string())
smtpObj.quit() smtpObj.quit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment