GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 06-Jan-2008, 11:02
Flavs83 Flavs83 is offline
New Member
 
Join Date: Mar 2007
Posts: 6
Flavs83 is on a distinguished road

Help .. I cant send mail with php


Hi all,

It is driving me crazy with email on php. I keep this 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:\Program Files\Apache Software Foundation\Apache2.2\htdocs\PHP+MYSQL\sendtest.php on line 8

PHP Code:

<?php
$email = "something@hotmail.com";
//$message = "$name<p>$email<p>$msg";
$message_cus = "Thank you for your input. You should receive a response within 72 hours.<p>Regards,<br>Hill Technologies";
$headers = "From: [email]something@yahoo.com[/email]";

//mail("something@hotmail.com","Website Inquiry",$message,$headers);Insert Applicable Email
mail($email,"Hill Technologies",$message_cus,$headers);
?>


Please help!!! Thank you.
Last edited by LuciWiz : 20-Jan-2008 at 08:11. Reason: Please insert your Php code between [php] & [/php] tags
  #2  
Old 07-Jan-2008, 18:43
TurboPT's Avatar
TurboPT TurboPT is offline
Regular Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 952
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Help .. I cant send mail with php


What is your PHP version?

Oh, and make sure there is not any anti-virus/firewall programs blocking the port.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #3  
Old 08-Jan-2008, 09:58
Flavs83 Flavs83 is offline
New Member
 
Join Date: Mar 2007
Posts: 6
Flavs83 is on a distinguished road

Re: Help .. I cant send mail with php


I am using php5.2.0 or 5.2.3. I tried it already .. i set my anti-virus and firewall to allow port 25 but it did not work ... do i need to have outlook or some email server??
  #4  
Old 08-Jan-2008, 10:13
NHDriver4's Avatar
NHDriver4 NHDriver4 is offline
New Member
 
Join Date: Jan 2008
Location: New Hampshire, USA
Posts: 10
NHDriver4 will become famous soon enough

Re: Help .. I cant send mail with php


You do need an email server for php to send email. You can probably use your ISP's SMTP server for this.

http://email.about.com/cs/phpemailtips/qt/et021802.htm
 
 

Recent GIDBlogToyota - 2008 August Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sudoku C++, need lots of help :S 3shtar C++ Forum 3 06-Apr-2006 10:10
How do I send better e-mails with PHP? Snapple MySQL / PHP Forum 4 24-Jan-2006 20:47
PHP mail() not working sajuat MySQL / PHP Forum 1 22-Jul-2004 07:10
600MB Space, 20GB Banwidth, PHP, MySQL, CGI, SSH, FrontPage, FTP, POP3, Web Mail fcolor Web Hosting Advertisements & Offers 0 08-Aug-2003 10:11

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:54.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.