from tnzapi import TNZAPI client = TNZAPI( Sender="YOUR_EMAIL_ADDRESS", APIKey="YOUR_API_KEY", ) request = client.Send.Email() request.MessageID = "ID12345" # Your custom MessageID request.Reference = "Test Email - Advanced version" request.SMTPFrom = "email@test.com" # Sender SMTP From Address request.From = "Test Email" # Sender Email Name request.FromEmail = "from@test.com" # Sender Email Address request.ReplyTo = "reply@test.com" # Set Reply To request.EmailSubject = "Test Email" request.MessagePlain = "Test Email Body" request.MessageHTML = "<html><body><p>This is <b>Test message body</b>. Thank you so much!</p></body></html>" request.Recipients = [ { "Recipient": "email1@test.com", # Recipient Email Address "Company": "Test Company", # Company Name "Attention": "Test Recipient", # Attention "Custom1": "Custom1", # Custom Field "Custom2": "Custom2", "Custom3": "Custom3", "Custom4": "Custom4", "Custom5": "Custom5" }, { "Recipient": "email2@test.com", # Recipient Email Address "Company": "Test Company 2", # Company Name "Attention": "Test Recipient 2", # Attention "Custom1": "Custom1", # Custom Field "Custom2": "Custom2", "Custom3": "Custom3", "Custom4": "Custom4", "Custom5": "Custom5" } ] request.AddAttachment("C:\\File1.pdf") # Add Attachment request.AddAttachment("C:\\File2.pdf") # Add Attachment response = request.SendMessage() print(repr(response))