1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<?php
namespace SolidWP\Mail\Connectors;
/** * Class ConnectorBrevo * * This class provides the configuration for the Brevo SMTP service. * It extends the ProviderSMTP class and sets the necessary parameters * for connecting to the Brevo SMTP relay. * * @package Solid_SMTP\Providers */ class ConnectorBrevo extends ConnectorSMTP {
/** * ConnectorBrevo constructor. * * Initializes the Brevo SMTP provider with default settings. * * @param array $data Optional configuration data. */ public function __construct( array $data = [] ) { parent::__construct( $data );
// Prefill the needed data for Brevo. $this->host = 'smtp-relay.brevo.com'; $this->port = 587; $this->authentication = 'yes'; $this->secure = 'tls'; $this->name = 'brevo'; }
/** * @param array $data * * @return void */ public function process_data( array $data ) { $this->from_email = $data['from_email'] ?? ''; $this->from_name = $data['from_name'] ?? ''; $this->smtp_username = $data['smtp_username'] ?? ''; $this->smtp_password = $data['smtp_password'] ?? ''; $this->description = 'Brevo'; } }
|