After i installed VestaCP from time4vps billing i have working email.
But after i install it on fresh centos 6 vestacp with nginx+php-fpm i get error in sending mails from web.
get this error from my web:
Unknown error type: [2] stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed on /home/admin/web/DOMAIN/public_html/includes/packages/PHPMailer/class.smtp.php line 344
My NOTICE [1024] ---->PHPMailer error: SMTP Error: Could not connect to SMTP host.
on /home/admin/web/DOMAIN/public_html/includes/class_email_handler.php line 500
Can you help me fix this or try to setup your VestaCP installation with
http://www.tpweb.org/2015/11/26/vestacp-upgrade-instructions-apache-php-fpm-centos/
Comments
could you clarify why you do not want to use our working VestaCP OS template?
Only if you create new OS for VestaCP with nginx + php-fpm
Regarding your request we have changed your domain to "DOMAIN".
It seems like you're encountering an issue with SSL/TLS verification when trying to send emails from your web application using PHPMailer on a VestaCP server with CentOS 6, nginx, and PHP-FPM. Here are some steps you can take to troubleshoot and potentially fix this issue:
1. Check SSL Certificate Verification
SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
indicates that PHPMailer is unable to verify the SSL certificate presented by the SMTP server.2. Update CA Certificates
bash yum install ca-certificates update-ca-trust
3. Configure PHPMailer for SMTP
class_email_handler.php
in your case).Example configuration for PHPMailer using SMTP with SSL/TLS:
4. Verify SMTP Connectivity
5. Debugging
php $mail->SMTPDebug = SMTP::DEBUG_SERVER; // Set to 2 for detailed debugging
6. Consult VestaCP Documentation and Support
By following these steps, you should be able to diagnose and resolve the issue with sending emails from your web application on your VestaCP server. If the issue persists, consider consulting with a system administrator or your hosting provider latest version for further assistance.