PHP Mail Function Disabled on Shared Web Hosting
We decided to disable the mail function because the mail() function was often used by malicious users on our network to send spam and other unsolicited e-mails.
We recommend our customers to use an e-mail library in order to send e-mails, and there are many in which to choose from.
$mail->isSMTP(); $mail->Host = 'mail.yourdomain.com'; $mail->SMTPAuth = true; $mail->Username = 'email@example.com'; $mail->Password = 'Some-Password'; $mail->SMTPSecure = 'tls'; $mail->Port = 587;
include('Mail.php'); $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => 'mail.yourdomain.com', 'auth' => true, 'username' => 'firstname.lastname@example.org', 'password' => 'Some-Password', 'port' => '587')); $mail = $smtp->send($to, $headers, $body);
To begin, first you need to install a plugin named WP Mail SMTP . Once the plugin is installed and activated, a new menu will show up under the Settings section called Email. You will need to navigate to it in order to configure WordPress to work with SMTP.Select 'Other SMTP' and Scroll down to the 'Other SMTP' section. Make sure to toggle the 'Authentication' button.
SMTP Host - mail.yourdomain.com Encryption - Use TLS encryption SMTP Port - 587 Username - Enter your Jolis International email address Password - Enter your email address passwordClick the Save Settings button.