Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python outlook

import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application")
# 创建一个邮件对象
mail = outlook.CreateItem(0)
# 对邮件的各个属性进行赋值
mail.To = "收件人邮箱"
mail.Subject = "邮件主题"
mail.Body = "邮件正文"
mail.Attachments.Add("附件绝对路径")
# 添加多个附件
# mail.Attachments.Add("附件1绝对路径")
# mail.Attachments.Add("附件2绝对路径")...
# 邮件发送
mail.Send()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Comment

PREVIOUS NEXT
Code Example
Python :: learn basic facts about dataframe | dataframe info 
Python :: pyqt5 line edit font size 
Python :: beautifulsoup find text inside tag 
Python :: pytorch multiply tensors element by elementwise 
Python :: torch.from_numpy 
Python :: ternary operator in python 
Python :: i have two versions of python installed mac 
Python :: python argparse argument without value 
Python :: pandas compare two columns of different dataframe 
Python :: python create a program that runs through all possible combinations 
Python :: upload_file boto3 headers 
Python :: Max fonction code in python 
Python :: length of list without len function 
Python :: python string to tuple 
Python :: python strptime milliseconds 
Python :: string.format() with {} inside string as string 
Python :: function in python 
Python :: create 2d array with rows and columns 
Python :: stop word python 
Python :: Python NumPy concatenate Function Example when axis equal to 1 
Python :: how to add one to a variable in python 
Python :: python split by list 
Python :: python set cookies 
Python :: python gui kivvy 
Python :: python dataframe contains value 
Python :: flip dictionary python 
Python :: random playing card generator python 
Python :: is python good for competitive programming 
Python :: fast way to load mongodb data into python list 
Python :: put cropped image in original image name folder python 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =