Mailer function won't work

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Mailer function won't work

Post by petehurn » Fri Nov 15, 2019 12:01 pm

As per my title my mailer function won't work, I have the latest PHP version but have tried the send email function in the global configuration section.
Tried send via PHP mail it says "could not start mail function" and "Test mail could not be sent"
Tried send via Sendmail and I get "Could not execute: /usr/sbin/sendmail" and "Test mail could not be sent"
Now via SMTP I get "SMTP connect failed https://github.com/PHPMailer/PHPMailer/ ... leshooting" and "Test mail could not be sent"
My PHP version is 7.3.11.

Has anyone any ideas, please not too complicated I am relatively new to the use of JOOMLA

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Fri Nov 15, 2019 1:30 pm

Email configurations, testing and networking can often be complicated, but here we go:

If you receive only error messages, the mail settings are incorrect. When you select SMTP, use the setting given to you by your host. Many hosts allow you to use only their outgoing SMTP server. If the intended mail server is outside your LAN, different types of configuration need to be done elsewhere.

It is possible to troubleshoot the SMTP connection and get all the details at the SMTP protocol level from the connection attempts. Set the System Debug plugin to log mail requests for Super Users, turn on Debug in the Global Configuration and run the test. The detailed log of the SMTP connection will be written into the file everything.php in the log folder, usually administrator/logs. Post a copy of the log file here for interpretation of the messages.
Toivo Talikka, Global Moderator

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Fri Nov 15, 2019 4:41 pm

OK I think I did that Ok but just got the same message ie
SMTP connect failed https://github.com/PHPMailer/PHPMailer/ ... leshooting
Is that of any use?

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Fri Nov 15, 2019 5:13 pm

Ok just got the one log message;
INFO controller

Checking edit ID com_plugins.edit.plugin.425: 1 Array ( [0] => 425 )
Call Stack

Does that help?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Sat Nov 16, 2019 1:39 pm

That is not useful.

Configure the Debug plugin, as described above.
Toivo Talikka, Global Moderator

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Sat Nov 16, 2019 3:08 pm

Ok I think I have done it right now and have 29 messages the first is ;
29 messages logged

DEBUG databasequery

SELECT `id`,`name`,`rules`,`parent_id`
FROM `e3gnq_assets`
WHERE `name` IN ('root.1','com_actionlogs','com_admin','com_ajax','com_akeeba','com_associations','com_banners','com_cache','com_categories','com_checkin','com_chronoforms5','com_config','com_contact','com_content','com_contenthistory','com_cpanel','com_fields','com_finder','com_flexicontact','com_installer','com_jce','com_joomlaupdate','com_languages','com_login','com_mailto','com_media','com_menus','com_messages','com_modules','com_newsfeeds','com_plugins','com_postinstall','com_privacy','com_redirect','com_search','com_sptransfer','com_tags','com_templates','com_users','com_weblinks','com_wrapper')
Call Stack

All the other logs are database queries do I copy all logs ?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Sun Nov 17, 2019 1:01 am

Database queries are not related to the mail connection problem. You need to do the following:

Configure the plugin System - Debug using the examples from the two images below.

Select the option 'Debug System' in Global Configuration - System - Debug Settings.

Click 'Send Test Mail' in Global Configuration - Server - Mail Settings.

The details of the SMTP connection and other dialogues are now written to the file administrator/logs/everything.php, including possible error codes. If you need assistance in interpreting the messages, post them here.

system-debug-plugin.jpg
system-debug-logging.jpg
You do not have the required permissions to view the files attached to this post.
Toivo Talikka, Global Moderator

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Mon Nov 18, 2019 1:07 pm

Many thanks for that and yes my debug set up is as above, but where do I find the
administrator/logs/everything.php. I have the debug console below do I find the logs in there?
Sorry I am completely new this and I may ask questions that seem obvious to most people, but not to me.

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Mon Nov 18, 2019 1:19 pm

Ok did it all again in the De bug console is says zero logged entries? I must be missing something, how do I get to read the logs on my web site?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Mon Nov 18, 2019 1:54 pm

You can download the file administrator/logs/everything.php by using File Manager or FTP, depending on what utilities there are in the cPanel of your host.
Toivo Talikka, Global Moderator

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Mon Nov 18, 2019 7:23 pm

I found a log file it's a text file but too big to copy can I upload it anywhere, here is a snap of the last bit, I'm not sure if it's the right one;
94.4.40.37 - - [18/Nov/2019:17:15:14 +0000] "GET /index.php/component/ajax/?format=json HTTP/1.1" 200 514 "http://www.blackpoolchess.org.uk/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
185.136.159.26 - - [18/Nov/2019:17:25:45 +0000] "GET /index.php/contact-us HTTP/1.1" 200 25943 "http://blackpoolchess.org.uk/index.php/contact-us" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
185.136.159.26 - - [18/Nov/2019:17:25:45 +0000] "POST /index.php/contact-us HTTP/1.0" 303 430 "http://blackpoolchess.org.uk/index.php/contact-us" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
185.136.159.26 - - [18/Nov/2019:17:25:46 +0000] "GET /index.php/contact-us HTTP/1.0" 200 26626 "http://blackpoolchess.org.uk/contact-us" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
40.77.167.169 - - [18/Nov/2019:17:26:19 +0000] "GET /index.php?catid=0&id=35 HTTP/1.1" 200 28179 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
94.4.40.37 - - [18/Nov/2019:17:29:14 +0000] "GET /index.php/component/ajax/?format=json HTTP/1.1" 200 514 "http://www.blackpoolchess.org.uk/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
157.55.39.44 - - [18/Nov/2019:17:42:16 +0000] "GET /robots.txt HTTP/1.1" 200 1130 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
207.46.13.126 - - [18/Nov/2019:17:42:38 +0000] "GET /index.php/1988-results HTTP/1.1" 200 23593 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
94.4.40.37 - - [18/Nov/2019:17:43:14 +0000] "GET /index.php/component/ajax/?format=json HTTP/1.1" 200 514 "http://www.blackpoolchess.org.uk/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
185.86.164.110 - - [18/Nov/2019:17:51:50 +0000] "GET /administrator/index.php?option=com_login HTTP/1.1" 200 5754 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
94.4.40.37 - - [18/Nov/2019:17:57:14 +0000] "GET /index.php/component/ajax/?format=json HTTP/1.1" 200 514 "http://www.blackpoolchess.org.uk/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"

Sorry I'm not much use don't quite understand how to use FTP, I got this from my hosts web site.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Mon Nov 18, 2019 11:40 pm

That is not the right file. Does the cPanel provided by your host have a utility called File Manager in the section Files?
Toivo Talikka, Global Moderator

smpleader
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Thu Jun 21, 2012 7:17 am

Re: Mailer function won't work

Post by smpleader » Tue Nov 19, 2019 10:41 am

Hi bro,
Are you sure PHP mail function works ? ( you can run test by PHP mail script directly )
And did you try smtp, how is the result ?
Mail issues mostly come from server itself.

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Tue Nov 19, 2019 8:04 pm

petehurn wrote:
Fri Nov 15, 2019 12:01 pm
As per my title my mailer function won't work, I have the latest PHP version but have tried the send email function in the global configuration section.
Tried send via PHP mail it says "could not start mail function" and "Test mail could not be sent"
Tried send via Sendmail and I get "Could not execute: /usr/sbin/sendmail" and "Test mail could not be sent"
Now via SMTP I get "SMTP connect failed https://github.com/PHPMailer/PHPMailer/ ... leshooting" and "Test mail could not be sent"
My PHP version is 7.3.11.

Has anyone any ideas, please not too complicated I am relatively new to the use of JOOMLA
As above both PHP and sendmail don't work either.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8205
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Mailer function won't work

Post by sozzled » Tue Nov 19, 2019 8:06 pm

@petehurn: did you see what @toivo wrote above? Do you think you could answer his question, please?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Tue Nov 19, 2019 8:18 pm

toivo wrote:
Mon Nov 18, 2019 11:40 pm
That is not the right file. Does the cPanel provided by your host have a utility called File Manager in the section Files?
I looked on my host and it says your FTP server for this domain is ftp1.namesco.net.

Is that of any use?

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8205
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Mailer function won't work

Post by sozzled » Tue Nov 19, 2019 8:26 pm

@petehurn: yes, FTP may be of some use (even though it's not quite what @toivo asked). Do you know how to use FTP?

Does namesco.net contain the files used by "blackpoolchess"?

I mean, what is the domain name of the website that's having problems with the mailer function? Is the domain name "namesco" or is it "blackpoolchess"?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Tue Nov 19, 2019 8:59 pm

sozzled wrote:
Tue Nov 19, 2019 8:26 pm
@petehurn: yes, FTP may be of some use (even though it's not quite what @toivo asked). Do you know how to use FTP?

Does namesco.net contain the files used by "blackpoolchess"?

I mean, what is the domain name of the website that's having problems with the mailer function? Is the domain name "namesco" or is it "blackpoolchess"?
I don't know how to use FTP and the domain problem is only with the Blackpoolchess web site I have another web site that works just fine on the same host.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8205
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Mailer function won't work

Post by sozzled » Tue Nov 19, 2019 9:03 pm

OK. Then knowing the FTP address isn't going to help you (especially if the FTP site doesn't allow you access to the "blackpoolchess" files). So, getting back to @toivo's question ...

... do you have access to the [webhost] cPanel (not the Joomla backend, the webhost's cPanel which is a different thing)?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Wed Nov 20, 2019 11:30 am

sozzled wrote:
Tue Nov 19, 2019 9:03 pm
OK. Then knowing the FTP address isn't going to help you (especially if the FTP site doesn't allow you access to the "blackpoolchess" files). So, getting back to @toivo's question ...

... do you have access to the [webhost] cPanel (not the Joomla backend, the webhost's cPanel which is a different thing)?
Yes I can get to the c panel of names.co.uk

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8205
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Mailer function won't work

Post by sozzled » Wed Nov 20, 2019 2:30 pm

Can you now answer @toivo's question, please?

toivo wrote:
Mon Nov 18, 2019 11:40 pm
Does the cPanel provided by your host have a utility called File Manager ...?
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Wed Nov 20, 2019 3:25 pm

toivo wrote:
Mon Nov 18, 2019 11:40 pm
That is not the right file. Does the cPanel provided by your host have a utility called File Manager in the section Files?
Sorry for the delay but yes found the file manager it is under the section PHP is that right?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Wed Nov 20, 2019 3:57 pm

If your host has given you cPanel and the icon is called File Manager, that is the right utility.
Toivo Talikka, Global Moderator

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Thu Nov 21, 2019 12:32 am

Ok I have found some files that are listed under blackpoolchess.org.uk/logs




blackpoolchess.org.uk / logs / ( 4 files & directories )


Name
Size
Date
Permissions
Check All:

error.log
0 B
Wed 20 Nov 01:53
-rw-rw----0660


error.log.1
170 B
Tue 19 Nov 07:17
-rw-rw----0660


web.log
308 kB
Thu 21 Nov 00:14
-rw-rw----0660


web.log.1
392 kB
Wed 20 Nov 01:13
-rw-rw----0660

When I download all files only 1 can be read so how can I use them?

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Thu Nov 21, 2019 12:35 am

The error log looks like this;
[2019-11-19 06:23:30] [authz_core:error] [client 5.9.66.153:0] AH01630: client denied by server configuration: /mnt/web/ns/std/6/3/6/blackpoolchess.org.uk/web/contact-us

Again means nothing to me.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Thu Nov 21, 2019 1:42 am

That log file comes from Apache, not Joomla.

Go to System - Global Configuration. In the System tab, under System Settings, check the contents of 'Path to Log Folder'. That is the folder where you can find the file everything.php.
Toivo Talikka, Global Moderator

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Sat Nov 23, 2019 12:01 pm

Well I finally have found the file in question so what am I looking for because its a big file?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Sat Nov 23, 2019 12:47 pm

Rename or delete the file logs/everything.php and repeat the test from Global Configuration - Server - Mail Settings and the new file will be smaller.

Look for lines similar to the following, from the start of the SMTP connection request:

Code: Select all

2019-11-23T12:34:46+00:00	ERROR ::1	mail	Error in Mail API: Connection: opening to localhost:25, timeout=300, options=array (
)
2019-11-23T12:34:50+00:00	ERROR ::1	mail	Error in Mail API: Connection failed. Error #2: stream_socket_client(): unable to connect to localhost:25 (No connection could be made because the target machine actively refused it.
) [C:\www\joomlatest\libraries\vendor\phpmailer\phpmailer\class.smtp.php line 298]
2019-11-23T12:34:50+00:00	ERROR ::1	mail	Error in Mail API: SMTP ERROR: Failed to connect to server: No connection could be made because the target machine actively refused it.
 (10061)
2019-11-23T12:34:50+00:00	ERROR ::1	mail	Error in Mail API: SMTP connect failed https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Toivo Talikka, Global Moderator

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11524
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Mailer function won't work

Post by toivo » Mon Nov 25, 2019 1:51 am

The lines from the log file everything.php you sent me show that the TCP port 25 on the web server does not accept the connection request from PHPMailer when Joomla tries to create a connection at the start of the SMTP dialogue (IP address redacted).

Send the extract of the SMTP connection attempt from the log to your host so that they can sort out the configuration of their mail server.

Code: Select all

2019-11-23T23:21:25+00:00    ERROR [ IP address ]    mail    Error in Mail API:
Connection: opening to localhost:25, timeout=300, options=array (
)
2019-11-23T23:21:25+00:00    ERROR [ IP address ]    mail    Error in Mail API:
Connection failed. Error #2: stream_socket_client(): unable to connect to
localhost:25 (Connection refused)
[/var/www/web/libraries/vendor/phpmailer/phpmailer/class.smtp.php line 298]
2019-11-23T23:21:25+00:00    ERROR [ IP address ]    mail    Error in Mail API: SMTP
ERROR: Failed to connect to server: Connection refused (111)
2019-11-23T23:21:25+00:00    ERROR { IP address ]    mail    Error in Mail API: SMTP
connect failed https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Toivo Talikka, Global Moderator

petehurn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Nov 15, 2019 11:49 am

Re: Mailer function won't work

Post by petehurn » Mon Nov 25, 2019 8:32 pm

Many thanks for your help I'll try what you suggest.


Post Reply

Return to “Administration Joomla! 3.x”