Python Code to Automate bulk emails

  • สถานะ: Closed
  • รางวัล: $50
  • ผลงานที่ได้รับ: 11
  • ผู้ชนะ: touseefahmad37

รายละเอียดการประกวด

Hello, I am looking for help with code to automate sending bulk emails through Python. I attached excel sheet where i need to pull emails, names, and amounts from and below is the current code I am using. I would like to keep this code if possible as it has worked well for other email automations.

The subject should read: "(Account Code: XXXXXX) Accessorial Increase"

The Template should read: "Hello (Sales Name: XXXXX), this account is currently up for M&A and we will be increasing their ELS to (ELS: $XX) and Discount (Discount: %XX)

Thank you,

Tony

Will need to CC someone as well.

and also add the Read receipt functionality. So that we know when/if the receiver get the email.

The code i currently have is below:

import win32com.client as client
import pandas as pd
import csv
from time import sleep
template = "Insert Body Here"
with open('FilePath.csv','r', newline='',encoding='utf-8-sig') as f:
reader=csv.reader(f)
distro = [row for row in reader]
chunks = [distro[x:x+30] for x in range(0, len(distro), 30)]
outlook = client.Dispatch('Outlook.Application')
for chunk in chunks:
for Name, Email in chunk:
message = outlook.CreateItem(0)
message.To= Email
message.cc="Email"
message.Subject = "Monitoring & Adjust November"
message.Body= template.format(Name)
message.save
sleep(60)

Please let me know if you can help!

ทักษะแนะนำ

คำติชมจากผู้ว่าจ้าง

“Excellent work and goes above and beyond the request!”

รูปประจำตัว ceccolinit, United States.

ผลงานอันดับสูงสุดจากการประกวดนี้

ดูรายการเพิ่มเติม

กระดานประกาศ

  • ceccolinit
    ผู้จัดการประกวด
    • 2 ปี ที่ผ่านมา

    please no more submission for now as i am working through this with someone. If that does not work out I will let you all know. I do not want you all wasting your time.

    • 2 ปี ที่ผ่านมา
    1. alvitrbd
      alvitrbd
      • 2 ปี ที่ผ่านมา

      Okay. Thank you.

      • 2 ปี ที่ผ่านมา
  • SebaGGu
    SebaGGu
    • 2 ปี ที่ผ่านมา

    I'm sorry for the late submission but I had to upload a script that I had already made in the past and would work nicely for this job. If the problem isn't fixed yet please take a look and see if it would work well for you.

    • 2 ปี ที่ผ่านมา
  • touseefahmad37
    touseefahmad37
    • 2 ปี ที่ผ่านมา

    Do you want to go with your script or We can use another one to send the emails ?

    • 2 ปี ที่ผ่านมา
    1. ceccolinit
      ผู้จัดการประกวด
      • 2 ปี ที่ผ่านมา

      i would like to add to my current script. i have worked with it in the past.

      • 2 ปี ที่ผ่านมา
    2. touseefahmad37
      touseefahmad37
      • 2 ปี ที่ผ่านมา

      ok , then I will make changes in your script only

      • 2 ปี ที่ผ่านมา
  • freelancersandh1
    freelancersandh1
    • 2 ปี ที่ผ่านมา

    i can do it but you have to enable imap or create app password in your account

    • 2 ปี ที่ผ่านมา
  • freelancersandh1
    freelancersandh1
    • 2 ปี ที่ผ่านมา

    what email provider do you use, like gmail, outlook?

    • 2 ปี ที่ผ่านมา
  • mf12343
    mf12343
    • 2 ปี ที่ผ่านมา

    What about a VBA code to do the same job???

    • 2 ปี ที่ผ่านมา
    1. ceccolinit
      ผู้จัดการประกวด
      • 2 ปี ที่ผ่านมา

      no please only in Python

      • 2 ปี ที่ผ่านมา
  • touseefahmad37
    touseefahmad37
    • 2 ปี ที่ผ่านมา

    In python only

    • 2 ปี ที่ผ่านมา
  • touseefahmad37
    touseefahmad37
    • 2 ปี ที่ผ่านมา

    Hi , I can work on this script to send the emails .

    • 2 ปี ที่ผ่านมา

แสดงความคิดเห็นเพิ่มเติม

วิธีเริ่มต้นจัดการประกวด

  • ประกาศการประกวดของคุณ

    จัดการประกวดของคุณ รวดเร็วและง่ายดาย

  • รอรับผลงานจำนวนมหาศาล

    รอรับผลงานจำนวนมหาศาล จากทั่วโลก

  • มอบรางวัลให้แก่ผลงานที่ดีที่สุด

    มอบรางวัลให้แก่ผลงานที่ดีที่สุด ดาวน์โหลดไฟล์ - ง่ายดาย!

โพสต์การประกวดตอนนี้เลย หรือเข้าร่วมกับเราวันนี้!