#给163发送邮件
import smtplib
from email.mime.text import MIMEText
nam='15527721040@163.com'
send='15527721040@163.com'
receive='371933505@qq.com'
pw = '37193350d' #此密码有误,运行时需修改
server='smtp.163.com'
port=0
message=MIMEText('<p>这是网页正文</p>','html','utf-8')
message['From']='xiatian'
message['To']='dongtian'
message['Subject']='big title'
smtp=smtplib.SMTP()
smtp.connect(server,25)
smtp.login(nam,pw)
smtp.sendmail(send,receive,message.as_string())
smtp.quit()
print('邮件发送成功,请查收')

非ssl给163发邮件,报错,无解ing的更多相关文章

  1. 关于163发邮件报错535 Error:authentication failed解决方法

    关于发邮件报错535 Error:authentication failed解决方法 调用163邮箱服务器来发送邮件,我们需要开启POP3/SMTP服务,这时163邮件会让我们设置客户端授权码,这个授 ...

  2. 关于发邮件报错535 Error:authentication failed解决方法

    写在最前面 相信看到535报错的同学代码编写方面都没有问题,只是不明白为什么填写了帐号密码后还是报535错误,这里我以163邮箱为例,并使用Python讲解怎么解决535问题 代码如下: import ...

  3. 解决mailx发邮件报错:esmtp-server: 504 5.7.4 Unrecognized authentication type [HK2PR02CA0167.apcprd02.prod.outlook.com] "/root/dead.letter" 11/302 . . . message not sent.

    报错信息: esmtp-server: 504 5.7.4 Unrecognized authentication type [HK2PR02CA0167.apcprd02.prod.outlook. ...

  4. AttributeError: module 'yagmail' has no attribute 'SMTP',关于使用yagmail发邮件报错的解决方法

    想用yagmail,发送自动化测试结果邮件,发现运行的时候报错.最后发现是自己的脚本名称用的yagmail.py,更改成另一个就好,换了my_yagmail.py 再运行OK啦!!!!

  5. python smtp发邮件报错“[Errno -2] Name or service not known”的解决

    最近给ss-py-mu写了个检查用户是否到期,并在到期前的第2天邮件提醒的功能. 配置存储在ini文件中,通过configparser模块获取,但尝试发送邮件的时候发现报错[Errno -2] Nam ...

  6. mailx发邮件报错Error initializing NSS: Unknown error -8015. . . . message not sent.处理

    前提:在配置zabbix3.0监控发送邮件告警时zabbix界面显示邮件以送达,但是QQ邮箱却没有收到邮件,再shell命令行测试发邮件QQ邮箱又是可以收到的,在别人的提醒下用zabbix用户执行发送 ...

  7. perl 用网易发邮件报错 554 DT:SPM 163 smtp14

    查看相关链接,貌似被当成垃圾邮件了,发不出去 554 DT:SPM 163 smtp14,EsCowACHUegmKpdc3giRMQ--.29617S2 1553410599,please see ...

  8. nodeJs的nodemailer发邮件报错hostname/IP doesn't match certificate's altnames怎么解决?

    今天在开发过程中碰到一个问题,即使用node发送邮件时报错hostname/IP doesn't match certificate's altnames,在网上查了解决办法有两个, 加rejectU ...

  9. mail发邮件报错 "send-mail: fatal: parameter inet_interfaces: no local interface found for ::1"

      发送邮件: [root@itfswelog123]# echo '测试邮件标题' | mail -s "数据库挂啦.挂啦.起床啦 "   xx@163.com 出现异常: [r ...

随机推荐

  1. 单选框radio改变事件

    <input type="radio" name="bedStatus" id="allot" checked="check ...

  2. layUI学习第四日:layUI布局系列一

    1.栅格布局规则 1.1 layui-row定义行,如:<div class="layui-row"></div> 1.2 layui-col-md*这样的 ...

  3. mock 模拟数据在框架中的简单使用

    首先在框架中需要安装mock模块 cnpm i mockjs -S 其次在src文件夹下新建mock文件夹,在mock文件夹中新建一个index.js文件 代码如下: const Mock = req ...

  4. CF620C Pearls in a Row

    CF620C Pearls in a Row 洛谷评测传送门 题目描述 There are nn pearls in a row. Let's enumerate them with integers ...

  5. bzoj5219 [Lydsy2017省队十连测] 最长路径

    题意: 做法来自 首先竞赛图缩点后是一条链,\(1\)号节点在开头的那个\(SCC\)中,因此从\(1\)号节点出发的最长链即为\(1\)号节点所在的\(SCC\)的大小\(+1\)号节点拓扑序之后的 ...

  6. vim 下修改tab键为四个空格

    最近在运行python的时候,发现tab键在在运行过程中无法使用,报错:IndentationError: unindent does not match any outer indentation ...

  7. 【mysql】You must reset your password using ALTER USER statement before executing this statement. 报错处理

    1.问题:登陆mysql以后,不管运行任何命令,总是提示这个 mysql> select user,authentication from mysql.user; ERROR 1820 (HY0 ...

  8. 使用XShell工具 linux 常用命令

  9. 从程序集加载类型,遇到 ReflectionTypeLoadException 的处理办法

    处理办法 catch ReflectionTypeLoadException ,然后从里面读取 Types 数据(成功加载的类型)就可以了. 参考 ReflectionTypeLoadExceptio ...

  10. Python入门36道经典练习题

    [程序1] 题目:有1.2.3.4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? num_list=[] cou=0 for i in range(1,5): for j in rang ...