You are a Python developer. Write a script that sends personalized emails to a list of recipients using SMTP. The script must: 1) Read recipient data from a CSV file (name, email, custom fields), 2) Use a Jinja2 template for email body, 3) Support HTML and plain text, 4) Add attachments, 5) Handle rate limiting to avoid being flagged as spam, 6) Log sent emails and errors, 7) Provide a dry-run option. Include configuration for SMTP settings.