473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

php mail() function and configuration settings

50
Hello all,
I have been trying to send email using the php mail functions..I have tried different examples but i keep getting the same error:
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:\wamp\www\... etc

I have tried googling the answer but i dont undertand the SMTP thing..from what i've understood there is some configuration settings i must change in the php.ini file???

i have wamp server installed with php version 5.2.5

thx for ur help
Mar 10 '09 #1
4 2239
hoopy
88
Hi, you need to actually have a mail server running locally if you wish to send mail through it. This is why the error, as there is none in your case.

If you POP an account somewhere you can use one of the mailer classes like PHPMailer or Swift Mailer to send your emails out via PHP.
Mar 10 '09 #2
poopsy
50
hmmm i dont quite understand..could use plz explain what i need to do to be able to send mails??
Mar 10 '09 #3
devsusen
136 100+
To send mail using php mail() function or by using some other classes you require a mail server. Wamp server doesn't install any mail server. This is the reason why you are getting the error. php mail() function uses the mail server situated in the localhost. This is the basic function provided by to send mail.

Now if you use mail classes like PHPMailer or Swift Mailer then you can send mail using POP account. In that case these mail classes will send mail via the mail server of the email account.

Hope this will help you.
Mar 12 '09 #4
poopsy
50
Yep..thx for the reply
Mar 12 '09 #5

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

Similar topics

5
by: NotGiven | last post by:
WHen I use php's mail() function, the recipient sees the hosting userID - NOT GOOD!. Are there any settings I can change or code it a different way? Thanks.
8
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 -------------------------------------------------------------------------------- ...
4
by: Max | last post by:
hi I am using System.Web.Mail.MailMessage with System.Web.Mail.SmtpMail to send mail. now the my question is, Is it compulsory to add fields smtpauthenticate, sendusername and sendpassword...
9
by: shror | last post by:
hi every body, i have a problem which is when i was checking my mail() form it work fine but the problem is that the form configuration is not set correctly, in details: the from var is not...
2
by: Claire | last post by:
I'm a noob at emailing from code and I need to add email capabilities to my application. The following code completes without exceptions but I'm not receiving any test emails. How do you debug...
1
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
I want to build an simple email smtp client app similar to outlook except with some custom features for a personal computer that uses comcast cable. The owner of the computer said she doesn't have...
7
by: r0g | last post by:
I'd like PHP to send mail to a local mailserver running at localhost:25 like I used to on windows. This mailserver is a dummy server which just writes the mail to disk for unit testing and works...
2
by: anu b | last post by:
Now i am sending email to my friend using session variable... but my code is as below private bool SendEmail(string email) { try
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...

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.