mailer error language string failed to load

Я работаю над отправкой некоторых писем, и PHPMailer отлично работает на моем тестовом сервере.

Теперь, после того как я переместил его на рабочий сервер, ни одна из моих писем не будет срабатывать, и я получаю

Ошибка Mailer: языковая строка не загружалась: создайте экземпляр.

Я занимаюсь поиском и обработкой с помощью phpmailer, чтобы понять, что кажется проблемой, и из того, что я собрал, я не смог сделать обычный запрос php mail() (это var, которому нужно вернуть true для ошибки, чтобы остановить

Но даже при настройке объекта и тела на одно слово и заголовки на самый простой вид

Функция почты по-прежнему возвращает false, и на данный момент у меня действительно заканчиваются идеи

У кого-нибудь есть что помочь? На данный момент он становится крайне расстроенным.

Я думаю, вы отправляете заголовок темы, закодированный как UTF-8 , который класс PHPMailer отвергнет, поскольку в нем содержится уникальная шведская буква, а именно «å».

Что-то вроде того:

Это преобразует строку в кодировку ISO-8859-1, которая, конечно же, отлично работает.

I am working on sending some emails and PHPMailer have been working perfectly on my test server.

Now, after i moved it to the production server, none of my mails will fire and i am getting a

Mailer Error: Language string failed to load: instantiate.

I have been googling and toiling with phpmailer to see what seems to be the problem and from what i gathered, i was not able to make a regular php mail() request (this is the var that needs to return true for the error to stop

But even when setting subject and body to one word and the headers to the simplest kind

The mail function still returns false and i am really running out of ideas at this point

Anyone have anything to help me out with? It is getting extremly frustration at this point.

I got this error when trying to send an email using smtp:

How can I fix it?

3 Answers 3

This usually means your phpMailer class cannot find the language file when it is trying to spit out a message.

Easiest way to fix this is to set the language manually including the path to the language folder:

It’s in your language folder. Or you can simply point your SetLanguage method to this source:

Оцените статью
SoftLast
Добавить комментарий