| | |
error in subcription email
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 35
Reputation:
Solved Threads: 0
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:
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..
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);
[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..
![]() |
Other Threads in the PHP Forum
- Previous Thread: Identifying users
- Next Thread: how to configure apache and php
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





