Lỗi could not instantiate mail function phpmailer error năm 2024

There are two possible situations where you might experience an error when trying to send emails with your own website.

But before you continue, we highly recommend to send with the MailPoet Sending Service instead and here's why.

1. If you already sent an email using your website

If you were already able to send MailPoet newsletters before and suddenly, you received the " Could not instantiate mail function" error, then make sure you have set your sending frequency to send 30 emails every 5 minutes, according to limits specified by your host.

2. If you were never able to send an email using your website

If your MailPoet is configured to send emails with your own host like in that image below:

..and you are getting this error message on your Newsletter pages:

...that means you are using an email address that doesn't match your website domain.

To correct this problem, you must use an email address from the same domain as your website (this email account can be created inside your host's control panel) and then specify this address in three places:

1) MailPoet > Settings > Basic tab:

2) MailPoet > Settings > Sign-up Confirmation:

3) On the latest step of the newsletter creation process:

*this must be done for all future newsletters

With these settings correctly setup, you'll be able to send your MailPoet emails using 1&1's servers.

If you are getting the error “Could not instantiate mail function” when trying to use the Send Email action, your server may be misconfigured for sending emails.

This is not a WS Form bug.

By default, WS Form sends emails to:

  • blog_admin_email – The Administration Email Address found in WordPress Settings > General

  • blog_name – The Site Title found in WordPress Settings > General

You can change these settings.

This article describes possible solutions to this problem:

Using a Local Web Server (e.g. WAMP)

Local web servers typically do not have a mail server running. This will prevent emails from being sent.

You should use an external SMTP server in conjunction with an SMTP plugin.

An Email Address is Invalid

Ensure your Send Email settings are correct and that your From and To email addresses are valid.

Sending emails From and To the same email address may, on occasion, cause issues.

Learn More

Your SMTP Plugin Cannot Accept Display Names

WS Form supports display names for email addresses (per RFC 2822). The WordPress wp_mail function also supports this format.

An example of this email address format is: joe.bloggs@emailtmp.com <Joe Bloggs>

We have found that some SMTP plugins have a bug that causes email addresses in this format to break the sending of emails.

Known plugins with this issue:

  • FluentSMTP
  • SendInBlue (Fixed in version 3.1.38)

We would suggest trying to remove the Display Name setting and then try to send the email again to confirm if this is the case with your SMTP plugin.

Invalid Subject Line

Avoid punctuation and special characters in your email subject line. Some mail servers will reject emails that contain certain characters. Keeping your subject line to alpha-numeric characters will increase your chance of deliverability.

Also ensure your subject line is not too long. We recommend keeping subject lines between 10 and 60 characters long.

Exceeding Quotas

Some SMTP providers impose quotas on how many emails you can send. If that quota is exceeded you will no longer be able to send emails. Login to your SMTP provider account to check your send count, quotas and frequency caps.

On this page

You are on a local server (using WAMP for example)

Your receiver e-mail address is not valid

You included a special character in the subject line

You included a special character in the sender/receiver information

Your subject line is too long

The bounce address you specified is not accepted by your server

You should specify a bounce e-mail address

You already sent too many e-mails!

You send multiple parts... and your host does not like it!

Your host does not allow attachments

Still can't make it work?

Chủ đề