You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending the same email with different attachments to different recipients but the script stops running after 3-4 iterations every time and also the first few mails take 10-15 seconds to send each
#260
Open
kdarsh17 opened this issue
Nov 22, 2022
· 0 comments
import yagmail
import pandas as pd
import os
data = pd.read_csv('studentscomp32.csv', header=0)
Name = data['Name']
Mail = data['Email']
Course = data['Course']
yag = yagmail.SMTP("[email protected]", "pw")
`try:`
for i in range(len(Name)):
yag.send(Mail[i],"Certificate of Completion for the course "+Course[i]+" awarded to "+Name[i]," Congratulations, attached with this email is your certificate", attachments=['/home/kyez/Code/CTE Mailer/comp32/'+Name[i]+'.pdf'])
print("Success")
except:
print("Fail")
``` ``
The text was updated successfully, but these errors were encountered:
My code:
The text was updated successfully, but these errors were encountered: