import os import resend from dotenv import load_dotenv
load_dotenv()
resend.api_key = os.environ["RESEND_API_KEY"]
f: bytes = open( os.path.join(os.path.dirname(file), "Daily Performance Report (July 25, 2025).xlsx"), "rb" ).read()
attachment:resend.Attachment = { "content": list(f), "filename": "Daily Performance Report.xlsx", }
params = { "from": "Autorep noreply@autorep.ourtelekom.com.sb", "to": ["anikwai.w@gmail.com"], "subject": "Hello world", "html": "It works!", "attachments": [attachment], }
resend.Emails.send(params)