HEX
Server: Apache
System: Linux outside 5.4.8_Algonet_ZeroMAC_0.9.4.8 #6 SMP Mon Feb 3 20:36:07 CET 2020 x86_64
User: server (1002)
PHP: 8.3.20
Disabled: exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: /home/muoapartman/www/wp-content/plugins/getwid/includes/mailer.php
<?php

namespace Getwid;

class Mailer {

	public function __construct() {
	}

	/**
	 * Send an email.
	 * @param string|array $to Array or comma-separated list of email addresses to send message.
	 * @param string $subject
	 * @param string $message
	 * @param array|string $headers Optional. Additional headers.
	 * @param array|string $attachments Optional. Files to attach.
	 * @return bool success
	 */
	public function send( $to, $subject, $message, $headers = null, $attachments = null ){

		add_filter( 'wp_mail_content_type', array( $this, 'filterContentType' ) );

		$result = wp_mail( $to, $subject, $message, $headers, $attachments );

		remove_filter( 'wp_mail_content_type', array( $this, 'filterContentType' ) );

		return $result;
	}

	/**
	 * Filter email content type.
	 *
	 * @param string $contentType
	 *
	 * @return string
	 */
	public function filterContentType( $contentType ){
		return 'text/html';
	}

}