Joomla ошибка подключения к smtp

0 Пользователей и 1 Гость просматривают эту тему.

  • 6 Ответов
  • 14746 Просмотров

Добрый день всем

у меня случилась грабля — отправляется почта но не на все ящики, точнее почти на все не отправляется, кроме некоторых моих.
раньше отправка была через php mail — на мои ящики приходило — а заказчик пишет что не может зарегиться — не приходит письмо
перепробовал все, Joomla 3.3
даже решил через smtp для яндекса — теперь выскакивает ошибка подключения
сейчас настройки для сервера следующие

отправка почты — Да
способ — smtp
email: имя@yandex.ru
отправитель: ИМЯ
авторизация: Да
защита: TLS
порт: 465
имя пользователя: имя
пароль: ***
server: smtp.yandex.ru

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

нашел статейку, попробовал

Решение проблем связанных с отправкой почты в Joomla и VirtueMart

Самый простой способ отправки почты через функцию php mail, используйте этот способ отправки на вашем хостинге. Если вы в настройках указали способ отправки через php mail, а почта не отправляется, убедитесь, работает ли функция mail(). Для этого создайте в корне сайта файл test.php следующего содержания.

<?php
if (mail(«vasha_pachta@mail.ru», «Тема», «бла бла…\nбла…бла….»))
  echo ‘OK’;
else
  echo ‘ERROR’;
?>
Запускаем файл: адрес_вашего_сайта/test.php, если после запуска скрипт выводит «ERROR», значит функция mail не работает на вашем сервере, стучите в техподдержку хостера, пускай подключают, все же 21 век на дворе). Если скрипт вывел «OK», значит письмо принято к отправке.

почта отправляется и приходит
значит mail() работает — там далее описано как править файл

После этого если письмо не дошло нужно подправить файл Joomla отвечающий за отправку почты. Открываем файл \libraries\phpmailer\phpmailer.php находим примерно в 472 строке след. участок кода

1
$params = sprintf(«-oi -f %s», $this->Sender);
заменяем найденую строку на

1
2
$params = sprintf(«-oi -f %s», $this->Sender);
$params = «»;
В большинстве случаев проблема решается таким способом. Дело в том, что переменная $params используется в качестве 5го аргумента функции mail(), хотя обычно в функцию mail() достаточно передать 4 параметра.  На некоторых хостингах почта из Joomla не отправляется с этим 5ым параметром.
если и после этого письма не отправляются значит они попадают в спам на стороне хостинга (возможно дело в адресе отправителя) либо на принимающей стороне (посмотрите в папке спам).

проблема в том что это описание для старой Joomla — в новой все подругому

причем самое паскудное, что регистрация через mail() приходит только на мои пару ящиков
вот это ваще мистика :o :o :o
 то есть она ходит на мой gmail на мой mail

а на все остальные не ходит — эт ваще пипец какой то
мож конечно она работает через локальный комп на котором денвер стоит…

Дабы не создавать новые темы.спрошу здесь.Joomla стоит на локальном сервере.Настроил почту через Gmail. В настройках Gmail Установите переключатель Включить IMAP. Сделал.
В Joomla всё прописал по инструкции.При попытке отправить тестовое сообщение выводится ошибка.  SMTP Error: Could not authenticate.
Помогите разобраться пожалуйста.

Чет долго никто не закроет вопрос.  ;) Один из ответов на эту тему SMTP Error: Could not authenticate нашел на сайте здесь

« Последнее редактирование: 12.11.2022, 20:47:06 от avtomastersu »

Записан

бред полнейший
если напрямую не указывать и не включать пароль приложений, то достаточно настроить порты
а smtp надо в почте ращрешить

Записан

индивидуальная помощь: @SetAlexx

Joomla is a commonly used content-management software for websites. In Joomla, emails are used for various purposes such as contact form submissions or password resets.

Joomla ‘SMTP connect() failed‘ is a commonly encountered email error in Joomla, when users try to submit a contact form in the website. Email fails to send, showing up this error.

By default, Joomla uses the PHP mail function to send mails. The settings for PHP Mail can be changed from the Joomla administrator dashboard.

Login to Joomla as admin user and go to the section ‘System’ -> ‘Global Configuration’ -> ‘Server’. Under ‘Mail Settings’, you can see PHP Mail as the Mailer and its corresponding settings.

Default setting in Joomla - PHP mail function

Default setting in Joomla – PHP mail function

What causes error Joomla ‘SMTP connect() failed’

In many servers where PHP mail function is disabled as a server security measure to avoid spamming, this default Mailer will not work to send mails.

That’s when we configure SMTP as the Mailer. From the drop-down for Mailer, choose SMTP instead of PHP Mail:

Change PHP mail to SMTP mail function

Change PHP mail to SMTP mail

Even though SMTP mailer is chosen, if the corresponding settings for the SMTP server is not configured correctly, it will not send mails successfully from the server.

Attempts to send mails from the Joomla website via contact form or password reset forms would end up giving error “Error while sending the email. SMTP connect() failed.”

The error ‘Joomla SMTP connect() failed’ is often caused by incorrect filling of the field ‘SMTP Security’ in the ‘Mail Settings’.

SMTP connection can fail to establish due to a number of reasons:

  1. Wrong username and password given in SMTP authentication.
  2. SMTP port blocked in server firewalls.
  3. Mail server does not support SSL/TLS.
  4. Using 3rd party servers such as gmail or other insecure apps.
  5. Upgrades to Joomla or PHPMailer versions that have enhanced security features or bugs.

How to fix error Joomla ‘SMTP connect() failed’

Here, we’ll see how to set each of these settings properly to avoid email delivery errors from Joomla. 

In Joomla administrator panel, under ‘System’ -> ‘Global Configuration’ -> ‘Server’ -> ‘Mail Settings’, choose Mailer ‘SMTP’ and enter host, user name and password. Turn on SMTP authentication section.

SMTP configuration settings for Joomla mail

SMTP configuration settings for Joomla mail

1. SMTP host and port settings

Enter the name of your mail server in ‘SMTP Host’ section. This is usually the ‘domain name’ or ‘mail.domain.com’. Make sure that the DNS for SMTP host resolves correctly.

Give port number as 25, the default SMTP port. For mail servers that use custom ports such as 587 for SMTP to avoid spamming, give that port.

It is also possible that certain mail servers restrict the access to their port 25 using firewall rules. In such cases, your IP should be white-listed in the firewall to avoid SMTP connect error.

To confirm that the connectivity to SMTP server and port is working fine, use the command:

telnet domain.com 25

Use the appropriate hostname and port number, after confirming that the SMTP connection is working fine. If the connectivity fails to establish, mail delivery will fail with the error ‘SMTP connect() failed‘.

2. SMTP authentication details

Every mail server has an authentication system to validate the users before allowing them to connect to it and send mails. In your Joomla Mail settings, turn this ON (YES).

Give the email account username and password. Enter the full ‘user@domain.com’ as the username in case of non-default accounts.

Whenever the email account password is changed or updated for security reasons, do not forget to change the password in ‘Mail settings’ also.

If the authentication details given are wrong, Joomla will fail to send mails and give the error ‘SMTP connect() failed‘.

3. SMTP security settings

For secure email transmission, it is always advisable to choose SMTP with SSL/TLS protocol. So, choose ‘SSL/TLS’ option from the drop-down for ‘SMTP Security’.

But is some email servers, this SSL/TLS support may not be enabled. In those cases, if you choose ‘SSL/TLS’ security, mails may not get delivered.

To verify the SSL certificate for your mail server, use the command:

openssl s_client -starttls smtp -crlf -connect mail.domain.com:25

Using expired or self-signed certificates can cause the mail delivery using SSL to fail and give error ‘SMTP connect() failed‘.

So the solution in those cases is to configure SSL for your mail server properly or change the SMTP Security settings from ‘SSL/TLS’ to ‘None’, which is less secure one.

Change Server Security from SSL/TLS to None

Change Server Security from SSL/TLS to None

4. Support for 3rd party apps

If you are using gmail email server instead of your own mail server, then there are a few points to note. You have to enable the ‘Authentication – GMail’ plugin.

You can do this from the Admin Area: ‘Extensions -> Plugin Manager -> Authentication – GMail’ option.

Also, Gmail servers may not accept connection attempts from certain mail client apps such as mobile apps. In those cases, either use a secure app or loosen the security measures.

In ‘My Account’ -> ‘Less Secure Apps’ section, turn on the option ‘Access for less secure apps’ to loosen the security settings.

This will avoid Joomla ‘SMTP connect failed’ errors when trying to send emails from Joomla using Gmail.

In short..

Other variants for ‘SMTP connect() failed’ error are ‘Called Mail() without being connected’ or ‘SMTP Error: Could not connect to SMTP host.’

In addition to the configuration settings we’ve discussed, one important point to keep in mind is the safety precautions to take during Joomla or PHPMailer upgrades.

Since new versions may often come with features or bugs that may break a working website, its always important to take proper backups and do test installs, before upgrading in the production server.

At Bobcares, our hands-on experience with both Joomla customization and server administration has helped us to perform upgrades and fixes in websites without causing any business downtime.

Read: Joomla customization with Bobcares

If you’d like to know how to secure and manage your servers and customize your websites to prevent errors, we’d be happy to talk to you.

Get a FREE consultation

Do you spend all day answering technical support queries?

Wish you had more time to focus on your business? Let us help you.

We free up your time by taking care of your customers and servers. Our engineers monitor your servers 24/7, and support your customers over help desk, live chat and phone.

Talk to our technical support specialist today to know how we can keep your service top notch!

TALK TO AN EXPERT NOW!

var google_conversion_label = «Blp0CLCojHIQ0aD71QM»;

Bobcares provides Outsourced Hosting Support and Outsourced Server Management for online businesses. Our services include Hosting Support Services, server support, help desk support, live chat support and phone support.

Настройка SMTP для Joomla

В этом посте я расскажу вам как настроить Joomla для отправки почты по протоколу SMTP. Для начала необходимо открыть панель администратора и зайти в «System->Global configuration» («Система->Общие настройки»).  В этом разделе открыть вкладку Server (Сервер) и в правом нижнем углу найти настройки отправления почты. В графе «Mailer» («Способ отправки») выбрать SMTP, в поле «From email» («Email сайта») указать вашу почту, а в поле «From Name» («Отправитель письма») имя отправителя. Далее поля заполняются в зависимости от настроек вашего почтового сервера, вы с легкостью их найдете по запросу вида «smtp google» или «smtp mail.ru». На скриншоте ниже изображены стандартные настройки моей почты на яндексе.

Joomla настройки SMTP

Ниже приведены рекомендуемые настройки для разных почтовых серверов (спасибо Aleks_e1_Dia):

Для mail.ru

E-mail сайта — указываете действующий почтовый ящик на mail.ru, например — test@mail.ru
Отправитель письма — имя отправителя (или название сайта, к примеру), которое будет отображаться у адресата в поле «От..»
Авторизация на SMTP-сервере — ДА
Защита SMTP — SSL
Порт SMTP-сервера — 465
Имя пользователя SMTP — это ваш действующий email на mail.ru, например — test@mail.ru
Пароль для SMTP — пароль от вашего почтового ящика
SMTP-сервер — smtp.mail.ru

Для gmail.com

E-mail сайта — указываете действующий почтовый ящик на mail.ru, например — test@gmail.com
Отправитель письма — имя отправителя (или название сайта, к примеру), которое будет отображаться у адресата в поле «От..»
Авторизация на SMTP-сервере — ДА
Защита SMTP — SSL
Порт SMTP-сервера — 465
Имя пользователя SMTP — это ваш действующий email на gmail.com, например — test@gmail.com
Пароль для SMTP — пароль от вашего почтового ящика
SMTP-сервер — smtp.gmail.com

Для Yandex

E-mail сайта — указываете действующий почтовый ящик на yandex.ru, например — test@yandex.ru
Отправитель письма — имя отправителя (или название сайта, к примеру), которое будет отображаться у адресата в поле «От..»
Авторизация на SMTP-сервере — ДА
Защита SMTP — SSL
Порт SMTP-сервера — 465
Имя пользователя SMTP — название вашего email до собаки, например — test для test@yandex.ru
Пароль для SMTP — пароль от вашего почтового ящика
SMTP-сервер — smtp.yandex.ru

Отправка почты через Rambler

E-mail сайта — указываете действующий почтовый ящик на yandex.ru, например — test@rambler.ru
Отправитель письма — имя отправителя (или название сайта, к примеру), которое будет отображаться у адресата в поле «От..»
Авторизация на SMTP-сервере — ДА
Защита SMTP — SSL
Порт SMTP-сервера — 465
Имя пользователя SMTP — это ваш действующий email на aol.com, например — test@rambler.ru
Пароль для SMTP — пароль от вашего почтового ящика
SMTP-сервер — smtp.rambler.ru

Для Yahoo

E-mail сайта — указываете действующий почтовый ящик на mail.ru, например — test@yahoo.com
Отправитель письма — имя отправителя (или название сайта, к примеру), которое будет отображаться у адресата в поле «От..»
Авторизация на SMTP-сервере — ДА
Защита SMTP — SSL
Порт SMTP-сервера — 465
Имя пользователя SMTP — это ваш действующий email на yahoo.com, например — test@yahoo.com
Пароль для SMTP — пароль от вашего почтового ящика
SMTP-сервер — smtp.mail.yahoo.com

Для Hotmail

E-mail сайта — указываете действующий почтовый ящик на mail.ru, например — test@hotmail.com
Отправитель письма — имя отправителя (или название сайта, к примеру), которое будет отображаться у адресата в поле «От..»
Авторизация на SMTP-сервере — ДА
Защита SMTP — SSL
Порт SMTP-сервера — 587
Имя пользователя SMTP — это ваш действующий email на hotmail.com, например — test@hotmail.com
Пароль для SMTP — пароль от вашего почтового ящика
SMTP-сервер — smtp.live.com

Теперь давайте рассмотрим часто встречающиеся ошибки при работе c этим протоколом.

Joomla smtp connect failed

Ошибка вида «joomla smtp connect failed» зачастую вызвана неправильным заполнением поля «SMTP Security». В этом случае необходимо уточнить, как их рекомендует заполнять ваш почтовый сервер.

Ошибки авторизации

Ошибки связанные с авторизацией возникают из-за неправильного заполнения юзернейма и пароля. Обратите внимание в яндексе в поле Username мы указываем содержимое нашего почтового ящика до собаки, в других почтовых серверах возможно необходимо указывать почту целиком.

The following From address failed: example@example.com : MAIL FROM command failed,553,5.7.1 Sender address rejected: not owned by auth user.

Welcome to the forum!

First of all, you should update Joomla to the latest version, which is 3.9.16 at the moment, but possibly 3.9.17 in the next few hours. Make sure that you have a full backup of the site, should something go wrong. It would also be a good idea to run a test update of a clone of the production site, restored on a localhost workstation, running a bundle like Wampserver.

The different behaviour of the browsers sounds strange. Check the browser extensions if some add-on interferes in the process. Just a guess.

The SMTP server or some firewall software may have something to do with the issue. However, it is possible to fully debug the connection and authentication process between Joomla and the SMTP server.

The instructions below show how to get a listing of all the SMTP requests and responses between the Joomla site and the SMTP server. The low level transaction log shows in detail what goes on during the opening of the SMTP connection and the authentication. You can then get your IT department or hosting provider to resolve any issues, if required.

Go to Extensions — Plugins and configure the system plugin ‘System — Debug’ with the following settings, which limit the debug output to Super User sessions only:

  • Allowed Groups: Super Users
  • Log Priorities: All
  • Log Categories: mail
  • Log Almost Everything

Go to Global Configuration and select the Debug option in System tab — Debug Settings — Debug System.
Then go to the Server tab — Mail Settings and click the button Send Test Mail.

The test result, success or failure, will then get displayed as a system message. Download the detailed log file ‘everything.php’ from the Joomla log folder, usually administrator/logs. If your site was installed some time ago, check the /logs sub folder in the main Joomla folder. Post the relevant lines from the listing here if you have any questions.

Here are the official Joomla! Docs for anyone else looking in the future:

https://docs.joomla.org/How_do_I_use_Gmail_as_my_mail_server%3F

How do I use Gmail as my mail server?

If you have a working Gmail account you can use Gmail as your mail
server by setting it in the global configuration.

On the server tab set the following:

Mailer: SMTP
SMTP Host: smtp.gmail.com
SMTP Port 465
SMTP Security: SSL/TLS
SMTP Authentication: Yes
Set the next two lines with your information. You need to use an app specific password (ASP), described below.
SMTP Username: your gmail username
SMTP Password: your gmail password

The following are also working combinations:

SMTP Port 587
SMTP Security: STARTTLS

SMTP Port 25
SMTP Security: STARTTLS

The SSL module does not need to be enabled in Apache.

The OpenSSL extension needs to be enabled in PHP. The details can be
found at http://www.php.net/manual/en/openssl.installation.php

If you are using WAMP on Windows, the openssl module is not enabled by
default and you need to enable it. To do this:

Open the php.ini file and uncomment the line extension=php_openssl.dll by removing the semicolon ; from the beginning of the line.
Save the php.ini file and restart the Apache service.

Note

Note that if you use 2-step verification in Gmail, you need to add a
new password in Settings — Accounts — Change accounts settings — Other
Google Account settings — Security — 2-step verification — Manage your
application specific passwords.

When the new Application Specific Password (ASP) is presented in
groups of four characters separated by spaces, make sure that you do
NOT enter the spaces into the SMTP password in the mail server
settings in Joomla.

You will need to make sure 2 Factor authentication is turned off:

https://support.google.com/accounts/answer/1070457

https://support.google.com/accounts/answer/1064203?hl=en&ref_topic=7189195

Instructions via computer

Open your Google Account.
In the "Security" section, select 2-Step Verification. You might need to sign in.
Select Turn off.
A pop-up window will appear to confirm that you want to turn off 2-Step Verification. Select Turn off.

Destroy all the backup codes that you’ve saved for signing in to this
account. Revoking app passwords you no longer use

If you used app passwords to let apps access your Google Account, you
may see errors when you turn off 2-Step verification. If this happens,
re-enter your Google Account password.

We recommend you revoke your app passwords:

Sign in to your Google Account.
In the "Security" section, select Signing in to Google.
Choose App passwords. You might need to sign in.
Next to an application or device, select Remove Remove .

The next time you sign in to the app or device, you’ll be asked to
enter your Google Account username and password. If an app doesn’t ask
right away, it might take longer to recognize that its app password
has been revoked.

You will need to set up an App specific password (but can only do so if the 2FA is turned off)

Don’t forget you have account level 2FA and email specific 2FA
https://support.google.com/accounts/answer/185833

Sign in using App Passwords

An App Password is a 16-digit passcode that gives a non-Google app or
device permission to access your Google Account. App Passwords can
only be used with accounts that have 2-Step Verification turned on.
When to use App Passwords

To help keep your account secure, use «Sign in with Google» to connect
apps to your Google Account. If the app you’re using doesn’t offer
this option, you can either:

Use App Passwords to connect to your Google Account
Switch to a more secure app

Create & use App Passwords

Note: If you use 2-Step-Verification and are seeing a «password
incorrect» error when trying to access your Google Account, an App
Password may solve the problem.

Go to your Google Account.
On the left navigation panel, choose Security.
On the "Signing in to Google" panel, choose App Passwords. If you don’t see this option:
    2-Step Verification is not set up for your account.
    2-Step Verification is set up for security keys only.
    Your account is through work, school, or other organization.
    You’ve turned on Advanced Protection for your account.
At the bottom, choose Select app and choose the app you’re using.
Choose Select device and choose the device you’re using.
Choose Generate.
Follow the instructions to enter the App Password. The App Password is the 16-character code in the yellow bar on your device.
Choose Done.

Most of the time, you’ll only have to enter an App Password once per
app or device, so don’t worry about memorizing it.

And Finally

In my case my host had disabled SMTP email sending for security purposes I had to contact them and they enabled it for my account.

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Jofemar 250 ошибка клапана эспрессо
  • Joomla ошибка базы данных
  • Jungheinrich ekx 515 коды ошибок
  • Jungheinrich eks 210 ошибки
  • Jungheinrich ejc 214 коды ошибок

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии