473,803 Members | 3,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Warning: Failed to connect to mailserver, verify your "SMTP" setting in php.ini

3 New Member
i am using IBSERVER and trying to mail a form to my email address my code is given below

form.html
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <form method="POST" action="mail.php">
  6. Name: <input type="TEXT" name="subject">
  7. Email: <input type="TEXT" name="email">
  8. <input type="SUBMIT" name="Submit" value="ok">
  9. </form>
  10. </body>
  11. </html>
  12.  
mail.php
Expand|Select|Wrap|Line Numbers
  1. <?PHP
  2. $email = $HTTP_POST_VARS[email];
  3. $mailto="muskhere@gmail.com";
  4. $mailsubj="Form submission";
  5. $mailhead="$email";
  6. reset ($HTTP_POST_VARS);
  7. $mailbody="Values submitted from web site form:\n";
  8. while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
  9. if (!eregi("\n",$HTTP_POST_VARS[email])) { 
  10. mail($mailto, $mailsubj, $mailbody, $mailhead); 
  11. }
  12. else
  13. {
  14. echo("Error, no comments were submitted!");
  15. }
  16. ?>
  17.  
Jul 14 '07 #1
4 1992
Atli
5,058 Recognized Expert Expert
Hi and welcome to TSDN!

To be able to use the mail() function you must have a working SMTP server and you must set the following lines in you php.ini file so they will point to you SMTP server.

Expand|Select|Wrap|Line Numbers
  1. SMTP = localhost
  2. smtp_port = 25
  3.  
Jul 15 '07 #2
appkausman
3 New Member
Hi and welcome to TSDN!

To be able to use the mail() function you must have a working SMTP server and you must set the following lines in you php.ini file so they will point to you SMTP server.

Expand|Select|Wrap|Line Numbers
  1. SMTP = localhost
  2. smtp_port = 25
  3.  
THANKS very much for your replay
how can i have working SMTP server i am using IBSERVER
can you tell me how to do that thanks very again
Jul 15 '07 #3
appkausman
3 New Member
THANKS very much for your replay
how can i have working SMTP server i am using IBSERVER
can you tell me how to do that thanks very again

i have tried it but it still not working can u help me further... please
Jul 16 '07 #4
Atli
5,058 Recognized Expert Expert
I'm not sure what IBSERVER is, so I can't really give you any real advise on that system, but there has been a lot of discussion about this topic on these forums.

Check out these topics, they might help you.
http://www.thescripts.com/forum/thread670549-SMTP.html
http://www.thescripts.com/forum/show...12#post2216412
http://www.thescripts.com/forum/thread662973-SMTP.html
Jul 17 '07 #5

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

Similar topics

2
4698
by: Mike Obiku | last post by:
First of all, I'm new to PHP. For my website I have some PHP scripts to run a photo database. New users have to register them selfs. After registring the new user is getting an e-mail maid by an php script. But if the user clicks on the button to sent his info, so the PHP can sent him an e-mail, it always results in this error Warning: mail(): SMTP server response: 451 Request action aborted; local processing error in {the file en line...
1
6059
by: King Kong | last post by:
Hi it seems this has been discussed various times. Although I cannot find a solution. Ebvironment: Win 2k Apache 2 PHP 4.3.7 I use the module mode and not the cgi mode. I cannot send email from this setup.
6
73774
by: aa | last post by:
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini in php.ini I have: SMTP = localhost SMTP_PORT = 25 SENDMAIL_FROM = NULL SENDMAIL_PATH = "H:\WINNT\system32\" (this is where sendmail.dll is sitting. H is the drive with w2k)
2
5767
by: Martin Lucas-Smith | last post by:
I'm finding when a mail is sent from a script, I get: Warning: mail() : Failed to connect to mailserver at "smtp.ntlworld.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Documents and Settings\ However, when using Outlook and setting the SMTP agent in that to smtp.ntlworld.com, on the same PC, mail is sent fine (using Outlook) without any problems.
2
10214
by: Copelandia Cyanescens | last post by:
Python Python 2.3.4, Windows, "clean" install, using the example code given in the documentation, I get this... Traceback (most recent call last): File "C:\projects\email\email.py", line 24, in ? server = smtplib.SMTP('mail.xxxxx.xxx') AttributeError: 'module' object has no attribute 'SMTP' I beg to differ, it most certainly does. Right? :)
5
12333
by: universalbitmapper | last post by:
Hi, I'm trying to send an e-mail from a .php script and ie6 returns this error: Warning: mail() : Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\PAMWD\chap11email\sendmail.php on line 12
4
1664
by: Screaming Eagles 101 | last post by:
How can I make my own Mail control (unvisible one) to use with a form ? Does anyone know where to find code ? I would like to fill in some parameters, and then send a mail, a bit like this : 'Button1_click... Dim dllMail as Object Set dllMail = CreateObject("MyDll.SendMail") With dllMail
9
14070
bonski
by: bonski | last post by:
hello everybody.. i just want to know what this error means... Error: mail() : SMTP server response: 501 #5.1.1 bad address the smtp set up was correct.. valid emails... and port. so im just wondering why this error still occurs. looking forward for your suggestions.. thanks!
5
6658
by: Carmine [www.thetotalsite.it] | last post by:
Hi everyone, I get a really odd error while using SMTPClient.Send() function in ASP.Net. The error is the following: Dim smtp As New Net.Mail.SmtpClient("smtp.thetotalsite.it", 25) Dim bodyMSG As String bodyMSG = "something" smtp.Send("something@thetotalsite.it", someone@gmail.com, "Message from thetotalsite", bodyMSG)
0
9703
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
9564
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
10316
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...
0
9125
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
7604
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
6842
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();...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
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
3798
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.