| | |
PHP mail()
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2009
Posts: 1
Reputation:
Solved Threads: 0
I have been using class.phpmailer.php script for sending mail from localhost without smtp server.
Everytime i try to send mail from my localhost then following error is generated:
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\send email\not working scripts\class.phpmailer.php on line 213
there was a problem sending this mail! Could not instantiate mail function.
in my php.ini SMTP is set to localhost and smtp_port is set to 25 without ";"
when using gmail smtp server with the same settings in php.ini then evrything works perfectly alright but this error is generated when not using smtp server.
Problem is that when i'm not connecting to SMTP server then why there is need to verify settings in php.ini
link: php mailer script @ http://phpmailer.sourceforge.net
Please anyone give solution to my problem.
Thanks.
Everytime i try to send mail from my localhost then following error is generated:
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\send email\not working scripts\class.phpmailer.php on line 213
there was a problem sending this mail! Could not instantiate mail function.
in my php.ini SMTP is set to localhost and smtp_port is set to 25 without ";"
when using gmail smtp server with the same settings in php.ini then evrything works perfectly alright but this error is generated when not using smtp server.
Problem is that when i'm not connecting to SMTP server then why there is need to verify settings in php.ini
link: php mailer script @ http://phpmailer.sourceforge.net
Please anyone give solution to my problem.
Thanks.
0
#2 Oct 9th, 2009
Unless you have a mailserver running on localhost, port 25, PHP cannot send emails. You either need to change the SMTP ports or mail function.
SMTP remotely connects to a remote mail server, allowing you to email from it.
SMTP remotely connects to a remote mail server, allowing you to email from it.
CodeJoust! Design + Development - Proud User of Ubuntu
![]() |
Similar Threads
- PHP Mail Error (PHP)
- Sending HTML email via PHP mail function (PHP)
- PHP mail() (Sendmail) Problem :( (PHP)
- PHP mail Help (PHP)
- PHP Mail with Sender ID (PHP)
- Problems with PHP mail function. (PHP)
- php mail form - need to redirect to new page (PHP)
- how do you setup php mail()? using sendmail and yellowdog linux w/apache and php4 (*nix Software)
Other Threads in the PHP Forum
- Previous Thread: display image sequentially in PHP and MySQL
- Next Thread: How to Display PDF yet restrict copy and print?
| Thread Tools | Search this Thread |
advanced ajax amf array arrays asp beginner broken c# class cms code curl data database display dns elearning email explodefunction external file files flash form forms functions gmail google googleapps head hosting html ibm image include indentedsubcategory insert integration java javascript jquery key lamp limit link linux local login loop mail malfunction matching menu mimic mobile multiple mysql news oop password paypal pdf persist php post projectmanagement provider query script search searchmonkey security server session smash sms smtp soap sockets spam sql system tag tutorial upload validation verify video virus vulnerability web webbrowser webdesign window xml yahoo ydn youtube zend






