HEX
Server: LiteSpeed
System: Linux server315.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: globfdxw (6114)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/globfdxw/www/wp-content/plugins/elementor-pro/modules/atomic-form/actions/email-settings.php
<?php
namespace ElementorPro\Modules\AtomicForm\Actions;

use ElementorPro\Core\Utils;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

class Email_Settings {
	private $email_settings;

	public function __construct( array $widget_settings ) {
		$this->email_settings = $widget_settings['email'] ?? [];
	}

	public function to() {
		return $this->email_settings['to'] ?? get_option( 'admin_email' );
	}

	public function from() {
		return $this->email_settings['from'] ?? 'noreply@' . Utils::get_site_domain();
	}

	public function from_name() {
		return $this->email_settings['from-name'] ?? get_bloginfo( 'name' );
	}

	public function subject() {
		return $this->email_settings['subject'] ?? sprintf(
			/* translators: %s: Site title. */
			__( 'New message from "%s"', 'elementor-pro' ),
			get_bloginfo( 'name' )
		);
	}

	public function message() {
		return $this->email_settings['message'] ?? '[all-fields]';
	}

	public function reply_to() {
		return $this->email_settings['reply-to'] ?? $this->from();
	}

	public function cc() {
		return $this->email_settings['cc'] ?? '';
	}

	public function bcc() {
		return $this->email_settings['bcc'] ?? '';
	}

	public function content_type() {
		return $this->email_settings['send-as'] ?? 'html';
	}
}