MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / __init__

Method __init__

keepercommander/email_service.py:532–550  ·  view source on GitHub ↗
(self, config: EmailConfig)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45

Tested by

no test coverage detected