import win32com.client as win32 outlook = win32.Dispatch('outlook.application') mail = outlook.CreateItem(0) mail.To = 'email.here@email.com' #mail.CC = "more email addresses here" #mail.BCC = "more email addresses here" mail.Subject = 'Write subject here' mail.Body = 'Hi Receipient,\n\nPlease find the file attached.\n\nRegards,\nSender' attachment = FileLocation +'/filename.xlsx'. mail.Attachments.Add(attachment) mail.Send()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter