Closed nasirmgcc closed 2 years ago
Hello nasirmgcc, I need more information to understand this issue. What exactly doesn't work? Which mistakes do you have? What version of php is installed on your server? Are all needed php modules installed?
I have updated all the necessary scripts changes for SMTP, when i am trying to see request to pull email , it taking too long and end-up with unreachable .
SMTP is for sending emails not for receiving them. This project uses IMAP for this. Are there other tools or applications on your server that successfully use IMAP for the same mailbox?
Yes, I am using GMail IMAP
it might be the blockage on the Hosting provider Firewall? is firewall of the Host can block PHP not to connect with GMail IMAP? the IMAP is enabled from Gmail and less security app is too.
Yes, it could be one of your hosting provider's firewall rules, but I have never run into that. You can check it out by yourself using this command on your server (you must have openssl installed):
openssl s_client -crlf -connect imap.gmail.com:993
Note that you should use imap.gmail.com
as the host name, not just gmai.com
!
Yes,i am trying now on my localhost, thank you " imap.gmail.com " i know abou this. let me try on localhost
BTW, this config works well for me:
'name' => 'Gmail',
'host' => 'imap.gmail.com',
'username' => 'user@gmail.com',
'password' => 'password',
'mailbox' => 'INBOX',
'encryption' => 'ssl'
Thank you for the sharing, Yes, these are also correct only missing was 'encryption' => 'ssl' i added an retested,
The error i am receiving:
Can't connect to imap.gmail.com,143: Network is unreachable
It looks like you have a blockage with reject rule or you have some kind of network problem.
This is received on the localhost i fixed with enabling with imap extension loaded Uncaught Error: Call to undefined function Liuch\DmarcSrg\Mail\imap_open()
{"error_code":-1,"message":"Can't connect to imap.gmail.com,143: Timed out"} with debug code on my localhost i got this
Can't connect to imap.gmail.com,143
You must not connect to port 143 (IMAP), you must connect to port 993 (IMAPS). Have you specified 'encryption' => 'ssl'
in the config file?
Can't connect to imap.gmail.com,143: Timed out
$mailboxes = [ // Just for displaying in web-admin. Not necessary. 'name' => 'Gmail', // Host of the email server. You can specify a port separated by a colon. 'host' => 'imap.gmail.com', // Connection encryption method. The valid values are: // 'none' - without encryption (strongly not recommend). // 'ssl' - SSl/TLS on a separate port, for IMAP it is usually port 993. // 'starttls' - STARTTLS method, usually on the standard IMAP port 143. Default value. 'encryption' => 'ssl', // Set true if you want to connect to the IMAP server without certificate validation 'novalidate-cert' => true, 'port' => 993,//465, // Mailbox user name. 'username' => 'dmarc.mgcc@gmail.com', // Mailbox password. 'password' => 'PASSWORD', // Mailbox name 'mailbox' => 'INBOX' ];
i tried both : 'novalidate-cert' => true, 'novalidate-cert' => false,
no successs
Hello, nasirmgcc.
I just pasted your config 'AS IS' into my conf.php on my localhost and got this:
Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Invalid credentials (Failure)
(of course I don't know the correct password) so it works for me.
Have you tried the command I mentioned above? What did it say?
p.s. There is no option port
in the conf.php, your option has no effect. If you want to specify a different port number you must use the option host
this way: imap.gmail.com:999
but it is not necessary in this case.
I don't know what i am doing wrong or why not working for me, if you dont' mind you can help me with i just created an email dmarc.analyzar@gmail.com Password: *****
I tested with, the results are same, can you test it and share with me the Copy you are using, and i can test here, because i tested my Firewall , etc everything is open.
App Password: *****
I created a simple php script and tested it's workign fine with App Passoword but now Dmarc script is replying too many failure requests. :( imap.gmail.com:993/imap/ssl/novalidate-cert
Finally worked 👍
I'm glad it finally worked! p.s. I have replaced the passwords with asterisks.
on Justhost server the smtp reading reports from email not working.