(self, config: EmailConfig)
| 530 | """ |
| 531 | |
| 532 | def __init__(self, config: EmailConfig): |
| 533 | super().__init__(config) |
| 534 | # Import here to avoid dependency if not using SES |
| 535 | try: |
| 536 | import boto3 |
| 537 | from botocore.exceptions import ClientError |
| 538 | self.boto3 = boto3 |
| 539 | self.ClientError = ClientError |
| 540 | except ImportError: |
| 541 | _, error_message = check_provider_dependencies('ses') |
| 542 | raise ImportError(error_message) |
| 543 | |
| 544 | # Initialize SES client |
| 545 | self.ses_client = self.boto3.client( |
| 546 | 'ses', |
| 547 | region_name=self.config.aws_region, |
| 548 | aws_access_key_id=self.config.aws_access_key, |
| 549 | aws_secret_access_key=self.config.aws_secret_key |
| 550 | ) |
| 551 | |
| 552 | def send(self, to: str, subject: str, body: str, html: bool = False) -> bool: |
| 553 | """ |
nothing calls this directly
no test coverage detected