473,785 Members | 3,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHPMailer debugging (Failed to connect to server)

Hi there,

I have a problem using PHPMailer.

On my local development machine, the script works fine and sends
emails.

On amy staging server, when I try to use PHPMailer to send() I see the
error:
SMTP -ERROR: Failed to connect to server: Permission denied (13)

Can anyone think of why my staging server is preventing my connection
to the external mailserver? Is there a setting in php.ini or apache
that could be preventing this?


Code:
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = true;
$mail->SMTPAuth = true;
$mail->Username = "XXXXXXXXXX ";
$mail->Password = "XXXXXXXXXX X";
$mail->Host = "21x.xxx.xxx.xx xx";

$mail->Subject = "Test Email"; // $email_subject;
$mail->From = "cc**@cccccccc. com"; // $from_email_add ress;
$mail->AddAddress("cx *********@gmail .com", "TEST YOU"); //
($to_email_addr ess, $to_name);

$mail->Send();
Dec 3 '07 #1
2 11486
NC
On Dec 3, 3:02 pm, jephperro <jeff.perrea... @gmail.comwrote :
Hi there,

I have a problem using PHPMailer.

On my local development machine, the script works fine and sends
emails.

On amy staging server, when I try to use PHPMailer to send()
I see the error:
SMTP -ERROR: Failed to connect to server: Permission denied (13)

Can anyone think of why my staging server is preventing my
connection to the external mailserver?
It could be anything, really... Permission denied (13), if memory
serves, is generated by phpMailer if a call to fsockopen() fails when
trying to establish an SMTP connection. So something is not working
right SMTP-wise between your staging server and your mail server:

1. You staging server (or a router to which it is connected)
may be blocking all outgoing SMTP traffic.
2. Your mail server may be configured to allow SMTP connections
only from certain servers (and your staging server isn't one
of those).

Cheers,
NC
Dec 3 '07 #2
Thanks for the help, it turned out that SELinux was preventing a
socket from being opened. My hosting company did the security
settings.

Jeff
Dec 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
965
by: Zhong Guan | last post by:
I got the error "JIT Debugging failed with the following error: Access denied" with my ASP.NET Project in C# Language, each time when I open the solution, the error notice me, to get rid of it , I've tried methods such as : Add the ASPNET user to the Debugger Users group reset IIS set jitdebugging = true in webconfig file all I've done no use, now I can't continue working by this problem, Is there anybody can help me? I'm so eager and...
0
1114
by: Michael Huhn | last post by:
I have a win2k-Server with IIS with several web applications. More than 5 developers use this server to develop different web applications with VS.NET 2003. Unforunately remote debugging does not work properly. It works sometimes but most of the time it doesn't. Is it true that developer B cannot work with the server when developer A is debugging a web app? So is A really debugging the whole server and not only the application or even...
1
1817
by: rams | last post by:
Hai all! When ever i'm trying to run a web application it's giving error " Unable to start debugging on web server, access denied " or Unable to start debugging on web server, catastropic failure " I'm using a system which has Windows 2000 professional and i'm( user id) there in administrator user list and debugget user list. In project setting i enabled asp.net debugging= true. Plz suggest me how to fix the problem.
10
8717
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an asp.net page. If I press OK then I get a page with this message: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser...
0
3205
by: Costi Stan | last post by:
Hello, I get all the time JIT Debugging failed with the following error: Access is denied. message when trying to my a webservice. MSDN say to add DOMAIN/ASPNET user to Debugging Users. I get the same error all the time even with this. I haven't changed my project settings. Can anyone tell me what to try next?
2
4800
by: harish | last post by:
Hello all, I am trying to use C# assembly /dll (which has public methods and events), ... trying to use it through a VB6 client.. I get the error, JIT Debugging failed with the following error: 0x800405a6 what seems to me is like the error occurs when an event is fired from .net code... since i observe the error only when its possible for an event to occur.
2
24883
by: Dariusz Tomon | last post by:
I got an ASPNET C# project from client. When I'm trying to open it in Visual Studio I get error message: "Unable to start debugging on the web server. Debugging failed because integrated Windows authentication is not enabled. Please see Help for assistance" - What could be the problem? Any suggestion will be appreciate. D.T.
4
9540
by: R.A.M. | last post by:
Hello, I am writing my first ASP.NET application (I use .NET 2.0, Visual Web Developer 2005 Express Edition and SQL Server 2005 Express Edition). The application builds successfully but when I try to start debugging from Visual Web Developer I receive message box: Unable to start debugging on the web server. Debugging failed because integrated Windows authentication in not enabled. But I want to use forms authentication! Here is my...
2
9796
by: jeffhan | last post by:
we have os/400 db2 database at the backend. i installed db2 v9 connect server on one windows server which is locating the same network with database server. now how to i configure the connect server and client, so client could access the database through the connect server? like that: db2client <--db2 connect server <--db2 mainframe database
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.