Email class in codeigniter is awesome but not if you are behind proxy server. I just make a mechanism to send an email to someone through my reservation application with codeigniter. I test it in my local machine with localhost address and it works. But when i move my code to different machine with some reverse proxy working, it is fail to send. I get some error message as below
A PHP Error was encountered
Severity: Warning
Message: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (No connection could be made because the target machine actively refused it. )
Filename: libraries/myemail.php
Line Number: 29
Just remember that i can send the email before, with localhost address. I implement this for creating connection through proxy server in my college. Any suggestion?
Related
How can I send an outlook email through a proxy server?
I am working for a company on a project, and I want my laravel project able to send the email. But, the company is protected by a proxy server and whenever I want to send email, I will get below kind of error:
Connection could not be established with host smtp.mailtrap.io >:stream_socket_client(): unable to connect to tcp://smtp.mailtrap.io:2525 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
my .env file:
MAIL_MAILER=smtp
MAIL_HOST={proxy_address}
MAIL_PORT=587
MAIL_USERNAME=*******#{Company_domain}.com
MAIL_PASSWORD=***************
MAIL_ENCRYPTION=''
HTTPS_PROXY = {proxy_name}:{proxy_password}#{proxy_address}:{port}
I configured Gitea to authenticate against an AD server, and I'm receiving the following error:
[...dels/login_source.go:390 LoginViaLDAP()] [E] LDAP Connect error, my.ad.server.address.here:LDAP Result Code 200 "Network Error": read tcp <gitea host ip>:37590-><ad server ip>:389: read: connection reset by peer
What is strange to me is that the number 37590 in the example above always changes at each occurrence. Is it a port number? If true, how can I track it so I can whitelist it at the AD server firewall?
I'm a newbie in Go, so I can't figure out what's happening.
The 37590 that you see is the source port. It is the port that the server will use when replying and helps your computer know which application the response is for. It's normal for that to change on each request.
You are correct in thinking that this is a network problem. The error message "connection reset by peer" means that someone along the line (either a firewall along the path, or the host itself) closed the connection. (a little more detail here)
If it is a firewall that is not allowing you, then you need a rule allowing access from gitea host ip:any to ad server ip:389.
i am using virtual host but phpmyadmin is also pointed to virtual host ip and working perfectly
when i register a account on my laravel project i am getting following error .
Connection could not be established with host [No connection could be
made because the target machine actively refused it.
#10061]
in my logs
#10061] in C:\xampp\htdocs\upload\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php:268
Stack trace:
This error can be caused by having the wrong values configured for MAIL_PORT, MAIL_ENCRYPTION, and occasionally MAIL_HOST.
swiftmailer is the library that sends email. You're getting the error when you register and Laravel tries to send an email.
"...the target machine actively refused..." means that the host resolved successfully, but the other computer either has a firewall blocking the port or no process is listening on that port.
Your mailer service should tell you what port to use in their documentation. If using MAIL_DRIVER=smtp and MAIL_ENCRYPTION=tls, typically this will be port 587, 465, or 25.
I have googled and searched all over but I am still having trouble getting connected to a site using the ftpzilla
I am getting this read out when I try to connect to the server using the network connection wizard
Connecting to probe.filezilla-project.org
Response: 220 FZ router and firewall tester ready
USER FileZilla
Response: 331 Give any password.
PASS 3.9.0.6
Response: 230 logged on.
Checking for correct external IP address
Retrieving external IP address from
http://ip.filezilla-project.org/ip.php
Checking for correct external IP address IP 173.56.114.112
bhd-fg-bbe-bbc
Response: 200 OK
PREP 60010
Response: 200 Using port 60010, data token 1063172065
PORT 173,56,114,112,234,106
Response: 200 PORT command successful
LIST
Response: 150 opening data connection
Response: 503 Failure of data connection.
Server sent unexpected reply.
Connection closed
The weird thing is I only get this error for this particular server and the server I use for my personal site (namecheap.com) gives me no such error. Does anyone know why this may be happening? And please try not to point me to the network configuration wiki because I have read through that and I still am at this point.
PORT 173,56,114,112,234,106
....
Response: 503 Failure of data connection.
...
please try not to point me to the network configuration wiki
You are using active mode, that is the ftp client (FileZilla) waits for a connection from the server. Obviously the server can not connect to the client which indicates that something like a firewall restricts the connection.
Since according to your description this happens only with few servers, you either use only these servers with active mode or these servers are protected by firewalls which do not allow active mode. Have you tried with passive mode?
I had a similar issue connecting and made the following changes and had success.
Go to File>>>Site Manager>>>
For my site, I changed the Encryption to "Only use plain FTP(insecure)" and had success. May you find the same success.
I am getting the error "Server response: 451 451 Temporary local problem - please try later" when sending password reminder emails via Laravel and Mailgun. I am running Laravel on VirtualBox.
I set up VirtualBox using Vagrant, would this have made a difference?
If I change the SMTP settings to my own host it works absolutely fine. Is there an issue with using Mailgun on a Virtual machine?
Update
I can send to Gmail addresses without any problems, however, they apparently are neither being blocked or allowed.
This is the error I get:
Failed: support#mydomain.com → me#anotherdomain.com Server response: 550 550
Verification failed for <bounce+ad0324.1a1312-me=anotherdomain.com#mydomain.com>
No Such User Here Sender verify failed
The error "451 Temporary local problem" comes from the actual mail server you are connecting to.
Typically, 451 errors are due to the receiving server rejecting your email. This can happen for a number of reasons but most likely is due to the recipients server being overloaded with messages. It can also mean that the recipients server has grey-listed the IP, and therefore delays the message until it can verify that the sending server is not trying to send spam. The receiving server may be offline as well.
Since this error message is so vague, you'll need to get more information from the recipient. I'd suggest waiting a few hours and try to send the email again.
It doesn't have to do with your Laravel installation or running with Virtualbox, further more because you tested with other SMTP settings.