Please add the break
:
recipients = ['email@example.com']
cc = ['email2@example.com', 'email3@example.com']
bcc = ['email3@example.com']
for item in doc.items:
if item.item_code == "SKU001":
frappe.sendmail(
recipients=recipients,
cc=cc,
bcc=bcc,
subject='T-Shirt in the quotation',
content='Please call the client for T-shirt details'
)
break # Stop after sending the email once if the item is found
Otherwise the mail will go multiple times if the item is multiple or same.