Test mail could not be sent. Topic is solved

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
Batdad
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Mar 08, 2024 6:19 pm

Test mail could not be sent.

Post by Batdad » Fri Mar 08, 2024 6:51 pm

Hi,
Trying to send a test email out using the built in PHP mail function but it keeps failing.

Getting notice "Could not instantiate mail function." and error "Test mail could not be sent.".
I've looked around at the past posts on the subject and tried a few suggestions that I thought may of made sense such as disabling a couple of plugins and making sure custom reply was disabled, few other things I checked but as of yet no luck.
Using Joomla 3.10.12 and PHP 7.4.33. I know it's old but client doesn't really want to change the template if it's not necessary.

URL - https://www.umfci.ca

If someone could help that would be great

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30945
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Test mail could not be sent.

Post by Per Yngve Berg » Fri Mar 08, 2024 7:38 pm

The PHP Mailer is not configured properly on your server (php.ini)

Select SMTP instead and put in the Credentials for you host's SMTP Server.

Batdad
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Mar 08, 2024 6:19 pm

Re: Test mail could not be sent.

Post by Batdad » Fri Mar 08, 2024 8:02 pm

Hi Per,

Thanks for the quick reply. Tried that and unfortunately I'm still getting errors:

Notice
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting

Error
Test mail could not be sent.

Pretty sure the settings are accurate.

Thoughts?

Cheers

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17445
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Test mail could not be sent.

Post by toivo » Fri Mar 08, 2024 9:15 pm

Debug the SMTP connection by following the instructions in this Joomla tutorial: How to debug SMTP mail in Joomla 3

Copy and paste the messages into your reply.
Toivo Talikka, Global Moderator

Batdad
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Mar 08, 2024 6:19 pm

Re: Test mail could not be sent.

Post by Batdad » Tue Mar 12, 2024 2:31 pm

Thank you. Here's what I found

2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: Connection: opening to ssl://smtp.ionos.com:587, timeout=300, options=array (
)
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number [[ROOT]/libraries/vendor/phpmailer/phpmailer/class.smtp.php line 298]
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [[ROOT]/libraries/vendor/phpmailer/phpmailer/class.smtp.php line 298]
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.ionos.com:587 (Unknown error) [[ROOT]/libraries/vendor/phpmailer/phpmailer/class.smtp.php line 298]
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: SMTP ERROR: Failed to connect to server: (0)
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: Connection: opening to ssl://smtp.ionos.com:587, timeout=300, options=array (
)
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number [[ROOT]/libraries/vendor/phpmailer/phpmailer/class.smtp.php line 298]
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [[ROOT]/libraries/vendor/phpmailer/phpmailer/class.smtp.php line 298]
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.ionos.com:587 (Unknown error) [[ROOT]/libraries/vendor/phpmailer/phpmailer/class.smtp.php line 298]
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: SMTP ERROR: Failed to connect to server: (0)
2024-03-12T14:21:39+00:00 ERROR 99.209.87.234 mail Error in Mail API: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting

Batdad
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Mar 08, 2024 6:19 pm

Re: Test mail could not be sent.

Post by Batdad » Tue Mar 12, 2024 3:18 pm

Found the issue, SSL/TLS needed to be changed to STARTTLS.

Thanks for all the help.

Cheers


Post Reply

Return to “General Questions/New to Joomla! 3.x”