zoukankan      html  css  js  c++  java
  • mailx 乱码,sendmail发html邮件,脚本开机启动

    echo "yes"|mailx -s "我" -S ttycharset=utf-8 -S sendcharsets=utf-8 -S encoding=utf-8 31872163@qq.com

    发送成功,不乱码了,具体尼马为啥没有示例,也在纠结,可能有哪写的不是哪么正规

    sendmail 发一封html邮件,命令如下:

    sendmail -t <<EOF
    To: zhangxiaoxu01@baidu.com
    Subject: sendmail
    MIME-Version: 1.0
    Content-Type: text/html; charset="utf-8"
    <html>
    <body>
    这是一个中文邮件<br/>yes
    </body>
    </html>
    EOF

    在新版本的centos7中,默认rc.local文件是不执行的,因为centos 7 支持使用service 命令的init.d中的启动方式,因为rc.local启动文件,如果命令的开始部份出错,后面部份也次终止,有着不易管理的问题,但rc.local文件还是支持的,可以使用chmod +x /etc/rc.d/rc.local 命令运行即可!

  • 相关阅读:
    阿里云nginx创建多站点
    linux 卸载php mysql apache
    centos php环境搭建
    jquery simple modal
    nodejs 安装express
    nodejs fs.open
    nodejs supervisor
    nodejs 运行
    nodejs shell
    PHP array_pad()
  • 原文地址:https://www.cnblogs.com/a-xu/p/4740177.html
Copyright © 2011-2022 走看看