From the Http://stackoverflow.com/questions/73781/sending-mail-via-sendmail-from-python
# import Smtplib for the actual sending function
import smtplib
# import-Email modules we ' ll need from
EMA Il.mime.text import Mimetext
# Open a plain
Some examples of sending emails using python are as follows:
The code is as follows:
#! /Usr/bin/python#-*-Coding: UTF-8 -*-
Import emailImport mimetypesFrom email. MIMEMultipart import MIMEMultipartFrom email. MIMEText import MIMETextFrom email.
This article mainly introduces seven python mail content sending methods. For more information, see
I. file-based emails
The code is as follows:
#! /Usr/bin/env python3# Coding: UTF-8Import smtplibFrom email. mime. text import MIMETextFrom email.
Write a small monitor using Python and write a monitor using Python
1. Getting Started
First of all, you have to use a C/C ++, java, Javascript, and so on. Programming is difficult, and python with some programming experience is relatively simple.
1.
This article describes how to use the Pythonemail module and the smtplib library to send emails. you can use the Python email module to send emails with attachments.
SMTP (Simple Mail Transfer Protocol)The Mail Transfer Agent (MTA) program uses the
The python script is used to send emails to nagios
Previously, the company's nagios email sending script was written using reverse CT, but there has always been a drawback that the nagios email text cannot be wrapped and can only be displayed on
Python 3.0 is often called Python3000 or Py3k. Compared with earlier versions of Python, this is a major upgrade. Python3.0 did not consider backward compatibility during design so as not to bring too much burden into it.
Differences between Python2.
python2.x and 3.x version differences
The 3.0 version of Python, often referred to as Python 3000, or simply py3k. This is a large upgrade relative to earlier versions of Python.
In order not to take in too much of a burden, Python 3.0 did not
This article describes how to use the smtplib module in Python to process emails. it is a basic knowledge in Python beginners. if you need it, you can refer to it in Internet-based applications, programs often need to automatically send emails. For
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.