(PS using xampp)
Apparently my machine won't send out emails using the Mailing APIs(PHPmailer,Swift) and even PHP's own mail() function. But whenever I run my emailing script on another machine, it works with no errors.
Tried it on other machines such as my univ's pcs, friend's pc and my other laptop.
Fatal error: Uncaught Swift_TransportException: Connection could not be
established with host smtp.gmail.com
Tried everything,but still to no avail on my current machine.
What this tells you is that there is nothing wrong with your script, but that your hosting provider blocks outbound SMTP. This is a very common problem, and it's covered extensively in the PHPMailer troubleshooting guide.
How you actually fix it depends on your ISP - it may be that you just need to ask them to unblock it (Scaleway), or that you need to send via their servers (GoDaddy), or in the worst case, that you need to find a new hosting provider...
Related
I am testing with the v2 C# payment example.
https://github.com/petespatio/connect-api-examples/tree/master/connect-examples/v2/csharp_payment/PaymentExample
When i run locally everything works properly and i can actually create a payment.
When i try to run on my website (1and1 hosted), i get
error calling charge: unable to connect to the remote server
Does anyone know what has to be done to allow this connection?
Regards
Have you tried pining the server you are connecting to? That's a good place to start. Try:
ping connect.squareup.com
To see if you can connect at all. If you can't ping the server, it might be a firewall issue on your server.
1&1 has information about setting firewall rules on their hardware firewalls for their dedicated linux servers here:
https://help.1and1.com/servers-c37684/dedicated-server-linux-c37687/system-security-c37699
and information on setting firewall rules for their cloud servers here:
https://www.1and1.com/cloud-community/learn/networking/firewall/
Hope this helps!
I am using the same setup as on the server. I have an EC2 instance running Ubuntu, then I am using Docker to host an Ubuntu image with runs my Laravel project on nginx and php7. My local is setup up the exact same, I use the same Docker image and everything.
When I test my emails on my local they work seamlessly, no errors or problems but as soon as I test it on my EC2 I get the following error in Laravel:
Swift_TransportException: Connection to tcp://smtp.mailgun.org:587 Timed Out in /app/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:404
I have tried using ports 25, 2525 and 465 butt he exact same result. Here are my env variables:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=postmaster#placeholder.com
MAIL_PASSWORD=5uup3rL0nGPa55w0RdY0uPr0bablykn0
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=no-reply#placeholder.com
MAIL_FROM_NAME="placeholder Team"
MAILGUN_DOMAIN=placeholder.com
MAILGUN_SECRET=key-MyK3y1s0ac001y0uw15hy0uhadi7h3h3
The secret and password is fake data
On Mailgun's dashboard I have verified my domain (locally I use localhost.MYDOMAIN.com pointing to 127.0.0.1) and all checks are green except for mxa.mailgun.org and mxb.mailgun.org because we are using gmail for our emails. Not sure if this is the source but I cannot risk disabling the emails just for a test.
If I telnet to Mailgun using telnet smtp.mailgun.org 25 (or any other port) I get a connection, so I do get access.
I also applied to relieve the email sending throttling on my server that Amazon puts onto EC2 servers. Not sure when this will actually be in effect so not sure if it will help or not (It might)
I am not sure why I only get a timeout on my server and it works on my local but any advice would be appreciated!
I did try searching around for answers but did not succeed.
WORKAROUND If anyone is struggling with this same issue, it is not worth the effort, rather just implement the Mailgun API, this way you do not have to put up with these issues, it is what I have now done which, had I known about the issues I would have faced, would have done from the start. So still no solution from my side, just avoided it and also why I am not updating with an answer and instead just updating with an edit. Not sure if this is the correct way.
I am using Putty to ssh into some of the servers that I work on. I am able to connect all others except the one. Although I was able to connect to it before. Whenever I try connecting to it, it always give me error:
Unable to open connection on myhost: Host does not exist
My firewall is off and I have even re-installed putty but that did not fix it. When I tried connecting to the same server using putty on some other windows system, I was able to do so. I searched regarding this on Internet but did not find much relevant.
I am running putty on Windows 7.
What can be the possible issue?
As I understand you have three computers involved. At the same time one connection is working and the other one fails. So we can exclude that the ssh daemon on your linux box is hanging.
In lack of knowing their real names I will call your computers linuxbox (this is the computer you want to ssh into), win7ok (that is the computer that you are able to ssh from using putty) and win7fail (that obviously is the computer you can't connect from).
Please do a tracert from both Win7 computers:
tracert linuxbox.your.domain
tracert linuxbox
Add the results to your question as it will help us find out what is happening.
Perhaps it is also a good idea to determine the ip address of the linuxbox from win7ok:
ping linuxbox
or
nslookup linuxbox
Then try to connect from win7fail by using the ip address of the target computer, perhaps it is only a DNS problem (which might be as nmap is failing too).
To make all of this easier to understand for us please provide the real names of the computers as you use them in putty.
For me the problem was with the Url of the reposity. Check remote URL. It must start with git#github.com, not https://.
I used nslookup and then used the ip address it gave me to connect and it worked
I had a similar problem with GitExtensions. The solution was to remove the https url and replace it with git#gitlab....
WRONG:
GOOD:
I just went through this. I have a Cisco VPN I need to use to get through to the Linux machine I wanted to login to and check.
No Putty session would get through using the machines name.
An nslookup on the windows machine yielded the correct address.
I too connected right in via the ip address.
I tried to Google the error and it failed, so I suspected the wireless.
Disconnected and reconnected my WiFi and all was good.
I did it fast enough that open connections stayed open.
And new connections refering to DNS names worked fine.
Seems like maybe some cached DNS addresses were stale.
Your DNS cache stores the locations (IP addresses) of web servers that contain web pages which you have recently viewed. If the location of the web server changes before the entry in your DNS cache updates, you can no longer access the site.
Following CLI command will do the trick:
ipconfig /flushdns
I am working on a sample which send file to server. To send file to server I am using WinHttpSendRequest() API. In my machine It worked fine. But for some other machine it is not working. It gives the error ERROR_WINHTTP_CANNOT_CONNECT(12029). I checked the Firewall setting; it is same as my machine.
Please let me know why I am getting this error.
Update: once after searching in the net, I think firewall is blocking the connection. I installed 3rd party Firewall and blocked all network operation in firewall. Once after blocking, I got 12029 errors.
My question is: is it possible to identify weather our request is blocked by firewall?
Please help me to solve this problem.
You could use the Windows Firewall API to check if certain ports are open or if your program has access. You can also use the API to configure the firewall to allow your program access if neccessary. Here are a few examples of using the interface:
http://msdn.microsoft.com/en-us/library/aa364726(VS.85).aspx
http://nsclient.org/nscp/browser/branches/stable/helpers/installer_dll_fw/firewall.cpp?rev=184
http://ultravnc.hg.sourceforge.net/hgweb/ultravnc/ultravnc/file/28d4e56ffaeb/UltraVNCv2/uvnc_settings/uvnc_settings/firewall.cpp
I have a strange problem, I just installed my php web site on a shared hosting, all services were working fine. But after configuring my app I just could visit my web site only once, other attempts gives:
"The server is taking too long to respond.".
But from other IP i can access, but only once, it seems all ip addressess beeing blocked after first visit(even ftp and other services get down, no access at all from the IP), can anyone help to explore this problem ? I don't think that it's my app problem, the app works fine on my local PC.
Thanks.
First thing to try would be a traceroute to determine where your traffic is being blocked.
In a windows command prompt:
tracert www.yoursharedhostingserver.com
At the moment, trying to access this address gives this:
Fatal error: Class 'mainController'
not found in
/home/myicms/public_html/core/application/crApplication.class.php
on line 181
I have tried it multiple times and it didn't block me. It might be that You have already solved this problem.
As far as I know, the behavior described by You could only be explained by a badly configured intelligent firewall. It may have been misconfigured by Your host.
If You visit a site at a certain host and suddenly You cannot access an ftp on this host, then it's either a (really bad) firewall or a (very mean) site that explicitly adds a firewall rule to ignore that address.
Some things that You might look into:
It might be something with identd too. What was the service You have configured on Your host? Was it by any chance any kind of server-controll panel (that might have an ability to controll a firewall)?
Is the blockade permanent, or does it go off after 24h, or does it only go off after rebooting the server? Does restarting some services makes the blockade go off?
Did You install any software that "protects Your server from portscanning"? It might be a bit too aggressive.
I wish You good luck in finding a source of this problem!
Chances are that if you can access it once that its actually working. The problem is more than likely in the php code than in the server.