首页 \ 问答 \ python 概念 list,string,tuple 类型区别 以及 数据类型区别

python 概念 list,string,tuple 类型区别 以及 数据类型区别

(1) list与(string,tuple)的类型区别 这题的答是 mutable 可变的 重点是第二题 (2) (list,tuple)与string的数据类型区别
更新时间:2022-05-07 20:05

最满意答案

可以通过如下方法实现:
1 下载并且安装msmtp软件,以msmtp-1.4.32.tar.bz2 
tar jxvf msmtp-1.4.32.tar.bz2
cd msmtp-1.4.32
./configure--prefix=/usr/local/msmtp
Make
Make install

2、手动建立配置文件,输入外部smtp地址
mkdir –p /usr/local/msmtp/etc
vi /usr/local/msmtp/etc/msmtprc
添加以下内容
account default 
host smtp.sohu.com                    #你的发送邮件服务器
port 25
from zabbix2014@sohu.com      #要从哪个邮箱发出
auth login
tls off
user  zabbix2014                      #邮箱用户名
password xxxxx-xxx                  #邮箱密码,如果你觉得不安全可以把文件改为600属性
logfile /var/log/mmlog
保存退出。

3、简单测试一下

/usr/local/msmtp/bin/msmtp  zabbix2014@sohu.com 
hello,test 
ctrl d
cat /usr/local/msmtp/msmtp.log 看看有没有成功。 
  然后再到sohu邮箱中,看看信收到没有

报错如下
[root@cache-2 msmtp-1.4.32]# /usr/local/msmtp/bin/msmtp zabbix2014@sohu.com
msmtp: authentication failed (method LOGIN)
msmtp: server message: 535 5.7.0 Invalid result
msmtp: could not send mail (account default from /usr/local/msmtp/etc/msmtprc)

Google之后,需要安装 mutt组件
4、下面开始安装 MUTT如果是CentOS的话直接用yum就好了
yum install mutt
安装完成后要手动给他建立一个配置文件,
vim /etc/Muttrc
setsendmail="/usr/local/msmtp/bin/msmtp" #你的msmtp命令路径
set use_from=yes
set realname="zabbix2014@sohu.com"
set editor="vim"
简单的4行就可以了
好了,让我们来测试一下吧!

测试一下:echo"test mail" | mutt -s "test" zabbix2014@sohu.com

OK,测试了下,能收到已经发送的email,如下所示:
echo"test mail 2014 content tom 2" | mutt -s "test 2014 title2"  zabbix2014@sohu.com

其他回答

邮件报警,这个如果您每天的发送量不是很大的话,可以调用网易,qq等邮箱服务器发送邮件报错信息,如果每天用到的量超过500封的话建议您找第三方邮件提供商或您可以通过技术自己来搭建自己的邮件系统。
短信报警,短信的发送无论是个人手机还是通过正规网关都是要经过运营商的,都有有成本的,这个没有免费的,如果有免费的估计也是个套,巴卜短信费用也没有多少,您可以了 解一下。
如有不清楚的可以进一步的与巴卜短信沟通交流希望我的回答能帮到您。

相关问答

更多
  • 在工具里面的邮件设置,填写邮件服务器(如果是公司内的服务器比较简单,如果是用第三方免费服务器,可能要去了解,所用的服务器,开放的端口是什么),再填写用来发邮件的帐号密码(开服务器需不需要密码验证),再添加收件地址,添加完之后,可以勾选,点击测试,看看有没有发送测试邮件。 关于报警的触发条件,可以根据自己的需求,勾选下面的选项。
  • 一:环境准备 由于要搭建的nagios主机是一个裸机,所以搭建nagios监控系统前需要搭建一个简单的LAMP平台, 这里我就直接用yum安装了 yum -y install http* mysql* php-* 对于英语不好的我,每做完一步我就喜欢用echo $? 验证一下 看看返回值是不是0 如果是0说明操作正确,否则错误,这种方法对我很实用,谁让英语差呢! [root@localhost ~]# service httpd start 启动 httpd: [确定] [root@localhost ~] ...
  • 可以通过如下方法实现: 1 下载并且安装msmtp软件,以msmtp-1.4.32.tar.bz2 tar jxvf msmtp-1.4.32.tar.bz2 cd msmtp-1.4.32 ./configure--prefix=/usr/local/msmtp Make Make install 2、手动建立配置文件,输入外部smtp地址 mkdir –p /usr/local/msmtp/etc vi /usr/local/msmtp/etc/msmtprc 添加以下内容 account defaul ...
  • 您的意思是实现邮件提醒或者短信提醒吧。 如果是这样的话,就下载客维通吧,它能够实现邮件提醒或者短信提醒的功能。 请先在客维通设置提醒的时间和事件,以及被提醒人的邮箱,到时会自动发送邮件; 然后在手机中安装163的邮箱大师或QQ的邮箱APP...
  • 您正在使用PendingIntent.getService()创建PendingIntent ,但您正在为Intent提供Activity 。 因此, PendingIntent.getActivity()代码工作,您需要使用PendingIntent.getActivity() 。 (此外,您必须将相应的标记添加到AndroidManifest.xml 。) 但是,这可能不是您想要的: lol Activity唯一做的就是添加通知。 您可能希望使用BroadcastReceiver ( ...
  • 调用setRepeatingAlarm()有一些延迟。 从服务或活动使用,例如Handler,并以小延迟发布一个runnable。 如果您正在进行活动,请不要忘记在生命周期方法中删除后期操作,例如onStop()。 如果要在用户单击通知时执行某些操作,请在contentIntent中编辑contentIntent。 例如 Intent action = new Intent(context, MainActivity.class); PendingIntent contentIntent = ...
  • 因此目前无法创建像苹果闹钟这样的自定义类型通知。 UIKit框架文档中没有它的踪迹。 我们所拥有的只是基本的UIAlertController和UILocalNotification类。 So for now it is not possible to create a custom type notification like Apple Alarm Clock. There is no trace of it in UIKit framework docs. All we have is basic U ...
  • UILocalNotification * localNotification = [[UILocalNotification alloc] init]; localNotification.fireDate = targetDateTime; localNotification.timeZone = [NSTimeZone defaultTimeZone]; localNotification.userInfo = @"Its Morning Time"; NSString * soundName ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。