Error while sending e-mail with phpmailer - email

I'm having this error while using phpmailer to send e-mails.
2022-11-28 11:29:32 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:04091068:rsa routines:INT_RSA_VERIFY:bad signatureerror:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature [C:\Apache24\htdocs\cursoCompletoPHP7\aula87\vendor\phpmailer\phpmailer\src\SMTP.php line 470]
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:04091068:rsa routines:INT_RSA_VERIFY:bad signatureerror:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature
The credentials that i'm using are correct. The mail server is office365.
I have the same application running in my computer, with the same php/apache instalation, same mail server, same credentials and it's working just fine, but in the production server, it stop working about 2 weeks ago (it was working fine and it suddenly stopped).
Can anyone tell me what could be wrong?
Thanks for the help!
I've tried using this application in another machine in the production network. It didn't work.

Related

DCOM got error "2147942405" from the computer x.x.x.x when attempting to activate the server:

I have a program on my computer that runs as SYSTEM and it is trying to launch an exe(opc server) on a remote machine x.x.x.x. But I get a DCOM error in my machine's eventviewer.
DCOM got error "2147942405" from the computer x.x.x.x when attempting to activate the server: yyyyy
I followed almost all the suggestions on the internet about opening dcomcnfg and adding users limits.default for launch and activation and Everyone,system,interactive,network from link (ftp://ftp.softing.com/pub/outgoing/opc/DCOM/DCOM-Settings-en.pdf) but nothing works.
Would anybody have nay other ideas on how to make this work.
According to MS Technet:
https://social.technet.microsoft.com/Forums/Azure/en-US/8bb5807f-73ba-4092-abc8-283d8fced6c4/request-a-certificate-from-certificate-service-fails-dcom-error-2147942405?forum=winserversecurity
With my VERY limited understanding of Certificate servers you may have one of the scenarios:
Client PC's are trying to connect to a Certificate server that no longer exists
Client PC's have a certificate that is valid but the Certificate server no longer exists
A Certificate server is broken
Clients do not have the proper authority to request the Certificate
I say this is limited knowledge as I am currently trying to remove AD Certificate services from a Domain Controller and I can see that in the System event log the exact same messages are being logged as I have stopped the Certificate services to asses the impact. If I get further information I will post back.

Java Web application not sending Email on Ubuntu server

My play framework web application sends automatically emails to user using Apache commons email library, everything works fine on my machine, but when I deploy it on an Ubuntu server it is unable to send email.
It throws exceptions like org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.googlemail.com:465 (I also tried different configuration with smtp.google.mail port 465,25 and 587 with or without ssl and tls)
and connection timed out.
I starting to believe that is a problem of some configuration of my ubuntu server.
Any suggestion?
If i type ufw status command I receive status disabled.
Thanks
I am going to close this question, because I found the solution. Basically my Server provider (Scaleway) has a security configuration where SMTP is blocked. I asked them to unlock It.

Odoo 10: Mail Delivery Failed (error: 111)

I am trying to send emails from my Odoo 10 installation. For this I have configured the outgoing mail server with Gmail SMTP as follows:
SMTP Server: smtp.gmail.com
SMTP Port: 465
Priority: 10
Connection Security: SSL/TLS
I have also configured my Gmail account to accept less secure connections from outside and when I run the test from Odoo's email configuration menu I get the following message:
Connection Test Succeeded! Everything seems properly set up!
BUT: If I try to send a real mail with Odoo I get the following error reason:
Mail Delivery Failed
Mail delivery failed via SMTP server 'localhost'.
error: 111
Connection refused
I don't know what to do, I searched for it on the internet but found nothing. Hope somebody can help me. Many thanks in advance.
From the error its clear that Odoo is trying to send emails using "SMTP server 'localhost'".
By default Odoo will create a localhost server in outgoing mail configuration menu. So you must set the "Priority" field in the form. Set the GMail server priority as "1"and localhost as "2" or any other value.
Priority: The priority of your mail server. The lower the number the
higher the priority. This will mean that the e-mail server with the
lowest number will be used the most.

Port 25 works when exe run manually but blocked when run as service

I am installing a program for a client which sends outgoing mail only using SMTP on port 25. Normally, the executable file runs as a service, but the initial mail test was failing, so I tried running the program manually (by double clicking the .exe file), which worked (outgoing mail sent successfully).
The service is running as the current user, who is a local admin (we have also tried running as local system account and computer administrator). We have tried with Windows Firewall turned off on the local computer, with the same results. We are coordinating with their tech support to see if they can find out why their mail server is behaving this way, but are not sure if they'll find anything as it seems like an obscure error.
Does anyone know why the port would allow a connection from the executable when run manually, but not when the executable is run as a service under the same user?
This is the error message the service is showing:
Error Descrip: Mail settings could not be validated.
Details:Connection to SMTP server: FAILEDTest failed (see details below).
-----------------------------Reason for failure: -> Socket read timeout-> Failed to get initial response-> The SMTP server may be denying access for this domain.-----------------------------
Error details: <?xml version="1.0" encoding="utf-8" standalone="yes" ?><ChilkatLog><VerifySmtpConnection>
<info>Checking connectivity to SMTP server mail.<server>.com:25</info> <smtp_host>mail.<server>.com</smtp_host>
<smtp_port>25</smtp_port>
<timeoutMS>10000</timeoutMS>
<error>Socket read timeout</error>
<error>Failed to get initial response</error>
<error>The SMTP server may be denying access for this domain.</error></VerifySmtpConnection></ChilkatLog>
This is not my area of expertise. What can I try next?

Mail sending but not receiving on Plesk server

I am having some PLESK Mail receiving issues.
I just setup a dedicated server with 1and1. The server console is PLESK 12. I am using 1and1 nameserver which are pointed correctly from the domain registrars. I am able to send mail using webmail but not able to receive it.
When I do a mail server check it I get the following error:
Error connecting to mailserver: No route to host
If anyone is aware of some missing SMTP settings that need to be set up in the initial Plesk configuration it would be appreciated.