Confirmation email not working

3 years 7 months ago #291432 by krileon
Replied by krileon on topic Confirmation email not working
Your SMTP settings are likely incorrect. Again, Joomla does not error when SMTP settings are wrong. It will simply fallback to phpmailer or sendmail as if nothing was wrong. Change to phpmailer or sendmail and see if emails will then send fine.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 7 months ago #291438 by fsduarte
Replied by fsduarte on topic Confirmation email not working
Hello krileon, thanks for your reply.

If I change GlobalConfiguratio->Server->Mail Settings to either "PHP Mail" or "Sendmail" them Joomla is not able to send e-mails anymore. I check this by clicking on "Send Test Mail" button.

If PHP Mail is selected, then I get the messages "Notice: Could not instantiate mail function" and "Error: Test mail could not be sent".

If Sendmail is selected, then I get the messages "Notice: Could not execute: /usr/sbin/sendmail" and "Error: Test mail could not be sent".

If I select SMTP I see that the e-mail is sent. So, I think Joomla is not falling back either of these options, because they do not work. There might be something missing in my server's configuration for these options to work.

However, and this might be the cause for CB failing to send e-mails, if I select SMTP and set Joomla error reporting to maximum, I noticed that the e-mail is indeed sent but I get an error message as below:

Error
A parse error has occurred while processing the following JSON data:
<br />
<b>Warning</b>: stream_socket_enable_crypto(): Peer certificate CN=`*.kinghost.net' did not match expected CN=`smtp.fabioduarte.fot.br' in <b>/home/fabioduarte/www/coa_restore/libraries/vendor/phpmailer/phpmailer/class.smtp.php</b> on line <b>355</b><br />
{"success":true,"message":null,"messages":{"message":["The email was sent successfully to <strong>webmaster@fabioduarte.fot.br<\/strong> using SMTP<\/strong>. You should check that you've received the test email."]},"data":true}

It seems that Joomla is expecting the certificate to be from my domain, but it is actually from my host domain.

Do you think CB would not send e-mails if this warning is reported? One thing I can guarantee you is that, in this same environment, if CB version is 2.1.0 the problem does not show up and CB is able to send e-mails.

One information that might be useful is that I also have Kunena in this environment, and Kunena e-mails are sent correctly.

I have a development environment that I can play without affecting the deployed website, so I can make any tests you recommend.

Best regards,
Fabio.

Please Log in to join the conversation.

3 years 7 months ago #291451 by fsduarte
Replied by fsduarte on topic Confirmation email not working
Hello,

I think I understand the problem better now and I have some useful information. I managed to get rid the warning I described above related to the certificate.

Error
A parse error has occurred while processing the following JSON data:
<br />
<b>Warning</b>: stream_socket_enable_crypto(): Peer certificate CN=`*.kinghost.net' did not match expected CN=`smtp.fabioduarte.fot.br' in <b>/home/fabioduarte/www/coa_restore/libraries/vendor/phpmailer/phpmailer/class.smtp.php</b> on line <b>355</b><br />
{"success":true,"message":null,"messages":{"message":["The email was sent successfully to <strong>webmaster@fabioduarte.fot.br<\/strong> using SMTP<\/strong>. You should check that you've received the test email."]},"data":true}

After getting rid of the warning regarding the certificates, CB is able to send e-mails. It seems that Joomla is ignoring the warning above but CB is not. Also, from my debugging, CB version 2.1.0 did ignore this warning. If I update to CB 2.1.2 then the problem appears, which makes me conclude CB 2.1.2 is not ignoring this warning.

It is true that by solving this warning I might have solved others that are not shown explicitly, but this would be more difficult to debug.

I hope this helps someone.

Thanks,
Fabio.

Please Log in to join the conversation.

3 years 7 months ago #291487 by krileon
Replied by krileon on topic Confirmation email not working
That's a certificate verification done by PHP 5.6 and greater. It's due to the hostname not matching the certificate. There's no workaround beyond properly supplying the hostname (your domain should supply this as it is not always your .com address) or turning off SSL verify (which is insecure and we won't do). I've no idea why Joomla ignores the certificate error though, but maybe the test email function works different than actual email usages (e.g. does Joomla send emails when using Joomlas mass mailer?).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 7 months ago #291513 by fsduarte
Replied by fsduarte on topic Confirmation email not working
Hello krileon, I agree with you that the correct fix for this is to correct the certificate problem. The trick I used to fix it was to change the Joomla Mail Settings so the SMTP server is the one that matches the certificate. In this case, kinghost.net, which is my hosting service. Perhaps this is indeed the correct setting. However, smtp.mydomain.com also exists but apparently the certificate is in the name of kinghost.net. I will check with my hosting if there is a way to have a certificate that matches my domain.

Now, answering your question, yes, Joomla sends e-mails in the Mass Mail function (not CB Mass Mail) even with the certificate problem. Also, Kunena notification e-mails were also being sent despite the certificate problem.

Best regards,
Fabio.

Please Log in to join the conversation.

3 years 7 months ago #291562 by krileon
Replied by krileon on topic Confirmation email not working

However, smtp.mydomain.com also exists but apparently the certificate is in the name of kinghost.net. I will check with my hosting if there is a way to have a certificate that matches my domain.

Your host is likely just routing smtp.mydomain.com to kinghost.net. That's fine I guess if you're not using any verification, but the certificate will never match (even email clients like Thunderbird should complain about this). Typically your hosting panel should have SMTP instructions and provide you with the correct hostname to use.

Now, answering your question, yes, Joomla sends e-mails in the Mass Mail function (not CB Mass Mail) even with the certificate problem. Also, Kunena notification e-mails were also being sent despite the certificate problem.

This is likely due to us using a more up to date PHPMailer class. We're a couple versions ahead of Joomla, which may have fixes and security changes that Joomla does not yet have.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.420 seconds

Facebook Twitter LinkedIn