Global settings apply to the entire message and are not tied to a specific personalization. You can configure the sender, reply-to address, content, attachments, and template IDs globally.
Key global attributes include:
from_email: The sender address.reply_to: The address used for replies.content: The body of the email (can be multiple types like text/plain and text/html).attachment: Files attached to the email.template_id: The ID of a dynamic template to use.category: A category assigned to the message.custom_arg: Custom arguments for tracking or metadata.batch_id: A unique ID for batching messages.
from sendgrid.helpers.mail import Mail, From, To, Content, MimeType, Attachment, FileContent, FileName, FileType, Disposition, ContentId, TemplateId
message = Mail()
message.from_email = From('help@twilio.com', 'Twilio SendGrid')
message.reply_to = ReplyTo('help_reply@twilio.com', 'Twilio SendGrid Reply')
message.content = [Content(MimeType.text, 'Plain text content'), Content(MimeType.html, '<strong>HTML content</strong>')]
message.template_id = TemplateId('13b8f94f-bcae-4ec6-b752-70d6cb59f932')