Hi all, i want to send mail through php coding.but error displays. i am working in windows environment. please help..
PHP Coding:
<?php
$to = "anandh@yahoo.com";
$subject = "Example";
$txt = "Test a Mail Function!";
$headers = "From: karthick@rediffmail.com";
mail($to,$subject,$txt,$headers);
?>
Error is:
Warning: mail() [function.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:\Program Files\xampp\htdocs\textexample\mailfn.php on line 8
hoew to rectify this. please tell in detail...
8 4286
There is No Problem in with the Coding.
Problem is with your php.ini file.
You have to set Your SMTP provider Address and PORT.
This File is Located at Windows folder.
Locate and uncomment SMTP settings with Your Values. - [mail function]
-
; For Win32 only.
-
SMTP = your.ISP.com
-
smtp_port = 25
-
There is No Problem in with the Coding.
Problem is with your php.ini file.
You have to set Your SMTP provider Address and PORT.
This File is Located at Windows folder.
Locate and uncomment SMTP settings with Your Values. - [mail function]
-
; For Win32 only.
-
SMTP = your.ISP.com
-
smtp_port = 25
-
and also: the initialization of 'sendmail_from' - ; For Win32 only.
-
sendmail_from = yourname@yoursystem.com
Ronald :cool:
Atli 5,058
Expert 4TB
and also: the initialization of 'sendmail_from' - ; For Win32 only.
-
sendmail_from = yourname@yoursystem.com
Ronald :cool:
Adding a "From: me@mydomain.me" to the headers will also work.
Adding a "From: me@mydomain.me" to the headers will also work.
Sure does.
Ronald :cool:
sorry, i still cant solve the problem of my forget password, i have install and open the free smtp server, when i send the mail, it have a warning as below...
Warning: mail(): SMTP server response: 503 in C:\Apache2\Apache2\htdocs\forgotPassword.php on line 25
Error sending email
What should i do now??? thanks..
n i try to click on the start menu, run, den type 'telnet localhost 25'
it show me:
220 localhost
Since you are accessing a remote SMTP server like smtp.gmail.com,
Your Server should connect to the Internet.Just Check it.Otherwise you can't send the mails from Local intranet to Internet.
Post your SMTP settings here.
Since you are accessing a remote SMTP server like smtp.gmail.com,
Your Server should connect to the Internet.Just Check it.Otherwise you can't send the mails from Local intranet to Internet.
Post your SMTP settings here.
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
sendmail_from = me@localhost.com
Emm.. wat should i do?? Thanks..
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
sendmail_from = me@localhost.com
Emm.. wat should i do?? Thanks..
Dear Friend,
Have you configured this localhost as a SMTP server.I don't think so.
Try to find out real SMTP service provider.Normally for the SMTP facility you can use most of the email service providers.Because SMTP is Not like POP.
If you are running from a home-based server supply your ISP's mailserver as your SMTP host.
smtp.mail.yahoo.com
25
smtp.gmail.com
465 or 587
Some times You need the Authentication also.....
Sign in to post your reply or Sign up for a free account.
Similar topics
by: GAT |
last post by:
I have a e-mail function in serverside VB, how would i put html code in the
body variable so when email is recieved it looks like html page in the body.
right now it just shows up as text in the...
|
by: Venkat |
last post by:
Hi,
My HTML page doesnot work properly in Netscape 7.1. But works fine
in Opera 7 and IE 6.0. I could not figure out the problem. If any one
could/suggest it would be nice.. This piece of HTML...
|
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
--------------------------------------------------------------------------------
...
|
by: gugdias |
last post by:
I'm coding a simple matrix class, which is resulting in the following
error when compiling with g++ 3.4.2 (mingw-special):
* declaration of `operator/' as non-function
* expected `;' before '<'...
|
by: Atara |
last post by:
In my WindowForms Application I have Control1 inside Control2 inside
Control3 inside theMainForm.
I have a scenario that Control1 should call/sendEvent to theMainForm. in
response, theMainForm...
|
by: dave |
last post by:
We have an application that works perfectly in-house (tested on 3
different servers). It uses Microsoft.Web.UI.WebControls.dll for menubars
and toolbars.
Problem Description:
We uploaded...
|
by: jadeite100 |
last post by:
Hi:
I am using IE 6 SP2.
My resize attribute does not work <body onresize="test1();">.
When I resize my window, the resize event doesnot get call.
I have a jsp page with an iFrame called...
|
by: Daniel Kraft |
last post by:
Hi,
I was curious whether or not to use the & operator when creating a
function pointer. It seems, that both &func and plain func create a
pointer of the appropriate function pointer type.
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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,...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
| |