error in subcription email

Reply

Join Date: Apr 2008
Posts: 35
Reputation: cali_dotcom is an unknown quantity at this point 
Solved Threads: 0
cali_dotcom cali_dotcom is offline Offline
Light Poster

error in subcription email

 
0
  #1
Oct 20th, 2008
hi, i just tried to add the email function to my website so that when users sign in the recieve an email but i keep getting this error. does anybody know what's wrong:

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 E:\Program Files\wamp\www\practice\sbdjobs\signup11.php on line 110

here is the code that contains the email function:

	//start building signup email
		$msg = "<p><b>Name:</b> '.$fname. ''.$lname.'</p>";
		$msg .="<p><b>Company Name:</b> '.$compname.'</p>";
		$msg .="<p>Thank you for signing up with sbdjobs.com. You can log in anytime to add, edit or view jobs</p>";
		$to = "'.$fname. ''.$lname.'<'.$con_email.'>";
		$subject = "Registration with sbdJobs.com";
		$headers = 'MIME-Version: 1.0' . "\r\n";
		$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		$headers .= 'From: sbdJobs.com' . "\r\n";
		$headers .="'.$fname. ''.$lname.'<'.$con_email.'>";
		
		//send mail
		mail($to, $subject, $msg, $headers);
everything worked fine before i added this function. my php ini file looks like this:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = tochi2k@hotmail.com


can anyone tell me what i did wrong.
thanks..
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 827
Reputation: pritaeas will become famous soon enough pritaeas will become famous soon enough 
Solved Threads: 135
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark

Re: error in subcription email

 
0
  #2
Oct 20th, 2008
Most likely there is no smtp running at your server.
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 35
Reputation: cali_dotcom is an unknown quantity at this point 
Solved Threads: 0
cali_dotcom cali_dotcom is offline Offline
Light Poster

Re: error in subcription email

 
0
  #3
Oct 20th, 2008
Originally Posted by pritaeas View Post
Most likely there is no smtp running at your server.
i,m running the wamp server, do you think smtp is not running in the wamp server?
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 827
Reputation: pritaeas will become famous soon enough pritaeas will become famous soon enough 
Solved Threads: 135
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark

Re: error in subcription email

 
0
  #4
Oct 24th, 2008
I'm sure it is not running. There is a thread about it on the wampserver forum. You would be able to use e.g. phpMailer using a GMail account, or another smtp account that will let you connect.
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC