473,657 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mail() connects to SMTP server, but then immediately disconnects

2 New Member
HI,
i have a problem similar to this one, but mainly the problem is that my php connects to the mails server, but disconnects immediately.

for example: here is the log of the mail server:

#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2007-08-07 15:00:23
#Fields: date time c-ip s-sitename s-computername s-ip s-port cs-method sc-bytes cs-host
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 HELO 32 -
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 MAIL 39 -
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 RCPT 31 -
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 RCPT 27 -
2007-08-07 15:00:23 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 QUIT 57 -

in this case the mail() function connected, but no email was sent. then i tried it with outlook express just to check what the log would read, and here is what i got :

#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2007-08-07 14:53:27
#Fields: date time c-ip s-sitename s-computername s-ip s-port cs-method sc-bytes cs-host
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 HELO 32 -
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 MAIL 43 -
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 RCPT 31 -
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 DATA 125 -
2007-08-07 14:53:27 127.0.0.1 SMTPSVC1 WEBHOST1 127.0.0.1 0 QUIT 57 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 30 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 EHLO 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 55 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 MAIL 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 12 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 RCPT 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 12 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 DATA 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 44 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 12 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 QUIT 4 -
2007-08-07 14:53:27 194.158.37.213 SMTPSVC1 WEBHOST1 - 25 - 68 -


which shows that it even connected to the remote server.


anyone has any idea what the problem is? here is the code in use :
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. /*variables*/
  4. $name = $_POST["name"];
  5. $surname = $_POST["surname"];
  6. $sex = $_POST["sex"];
  7. $address = $_POST["address"];
  8. $home = $_POST["home"];
  9. $mobile = $_POST["mobile"];
  10. $email = $_POST["email"];
  11. $dob = $_POST["dob"];
  12. $status = $_POST["status"];
  13. $overseas = $_POST["overseas"];
  14. $from1 = $_POST["from1"];
  15. $to1 = $_POST["to1"];
  16. $company1 = $_POST["company1"];
  17. $position1 = $_POST["position1"];
  18. $res1 = $_POST["res1"];
  19. $from2 = $_POST["from2"];
  20. $to2 = $_POST["to2"];
  21. $company2 = $_POST["company2"];
  22. $position2 = $_POST["position2"];
  23. $res2 = $_POST["res2"];
  24. $other = $_POST["other"];
  25. $cert = $_POST["cert"];
  26. $lang = $_POST["lang"];
  27. $educ = $_POST["educ"];
  28. $comp = $_POST["comp"];
  29. $info = $_POST["info"];
  30. $interests = $_POST["interests"];
  31. $agreement = $_POST["agreement"];
  32. $subject = "Curriculum Vitae of " . $surname .", " .$name ."";
  33.  
  34. /*received email form*/
  35. $message = "Standard Registration Form" . "\n\n";
  36. $message .= "Name: " . $name . "\n";
  37. $message .= "Surname: " . $surname . "\n";
  38. $message .= "Sex: " . $sex . "\n";
  39. $message .= "Address: " . "\n";
  40. $message .= $address . "\n";
  41. $message .= "Home Number: " . $home . "\n";
  42. $message .= "Mobile Phone Number: " . $mobile . "\n";
  43. $message .= "Email Address: " . $email . "\n";
  44. $message .= "Date of Birth: " . $dob . "\n";
  45. $message .= "Status: " . $status . "\n";
  46. $message .= "Willing to Work Overseas: " . $overseas . "\n\n";
  47.  
  48. $message .= "Employment History / Experience" . "\n\n";
  49. $message .= "From: " . $from1 . " To: " . $to1 . "\n";
  50. $message .= "Company: " . $company1 . "\n";
  51. $message .= "Position Held: " . $position1 . "\n";
  52. $message .= "Resposibilities: " . "\n";
  53. $message .= $res1 ."\n\n";
  54.  
  55. $message .= "From: " . $from2 . " To: " . $to2 . "\n";
  56. $message .= "Company: " . $company2 . "\n";
  57. $message .= "Position Held: " . $position2 . "\n";
  58. $message .= "Resposibilities: " . "\n";
  59. $message .= $res2 ."\n\n";
  60.  
  61. $message .= "Other Employment: " . "\n";
  62. $message .= $other ."\n\n";
  63. $message .= "Training and Certificates: " . "\n";
  64. $message .= $cert ."\n\n";
  65. $message .= "Languages: " . "\n";
  66. $message .= $lang ."\n\n";
  67. $message .= "Education History: " . "\n";
  68. $message .= $educ ."\n\n";
  69. $message .= "Computer Skills: " . "\n";
  70. $message .= $comp ."\n\n";
  71. $message .= "Other Information: " . "\n";
  72. $message .= $info ."\n\n";
  73. $message .= "Interests: " . "\n";
  74. $message .= $interests ."\n\n";
  75.  
  76. $message .= "Agreement: " . $agreement . "\n";
  77.  
  78. /*address to whom form will be sent*/
  79. $sendTo = "__MUNGED__";
  80.  
  81. $headers = "From: Contact From <" . $email . ">" . "\r\n" . "Reply-To: " . $email . "\r\n" . "Bcc: " . $Bcc . "\r\n";
  82.  
  83. mail($sendTo, $subject, $message, $headers);
  84.  
  85. /*change this according to page following confirmation of sending of CV*/
  86. header ("Location: home.html")
  87.  
  88. ?>
Aug 7 '07 #1
2 1902
pbmods
5,821 Recognized Expert Expert
Heya, bmamo. Welcome to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

I went ahead and split this off into its own thread so as not to hijack the other poster's problem.
Aug 7 '07 #2
bmamo
2 New Member
i'm sorry.. my bad...

and thanks !
Aug 7 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
5463
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
39
3309
by: Viken Karaguesian | last post by:
Hello all, <SIGH> I'm soooooo sick and tired of getting spam e-mails. I'm sure that part of the reson for this is that my e-mail address is publicly available on my website, ready to be picked by e-mail harvesting programs. I tried to thwart them by adding a REMOVE_THIS in my e-mail address (username@REMOVE_THISispname.net), but the e-mails have not stopped. As for NG's, I have the return address blocked in a similar fashion.
11
3496
by: Ed Bitzer | last post by:
I have been able using the namespace System.Web.Mail and its method Smtp.mail.send to mail simple text messages to a small group within our 55 and older community. I need help expanding the programs capabilities. Searching this forum I did not find any related information so if I have chosen poorly, I would appreciate a suggestion of a more appropriate dotnet forum. Now what I wish is the ability to send bcc's rather than to: (would be...
0
16458
debasisdas
by: debasisdas | last post by:
The follwing sample code uses predefined package UTL_SMTP to send mail. This package was first available in the version 8.1.7 . create or replace procedure sendmail(sender varchar2,recipient varchar2,subject varchar2, text varchar2) IS mailhost VARCHAR2(64) := '192.168.1.32';
0
8395
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
8310
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
8826
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
8732
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
8503
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
7330
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...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.