Welcome to WebmasterWorld Guest from 107.20.5.156

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Configure PHP for send mail

     

comdini

4:50 pm on Feb 14, 2011 (gmt 0)



My Website is created using with PHP. I've a requirement for generate mail through web. because which file should I edit with SMTP Details.

Regards,
COMDINI

rocknbil

5:02 pm on Feb 14, 2011 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Why can't you use the mail()function [us3.php.net]?

comdini

5:57 pm on Mar 2, 2011 (gmt 0)



I tried . but it comes a Error that "message sending faild..SMTP Error: Could not authenticate"

but in this Web Server SMTP Server is working perfectly. I tested on IIS & Telnet. On PHP have configure only one Website.

Our Emails running on MS Exchange 2007 Environment. I've provided the SMTP Server & User Authinications also. But it doesn't work.

Please tell me that which files should I edit for Mail configuration.


Regards,
COMDINI

timster

3:56 am on Mar 4, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How did you provide SMTP user authentication? If you provide a code sample we might spot the problem.

Please tell me that which files should I edit for Mail configuration.

You can check your php.ini file for sendmail configuration. Add appropriate values for auth_username and auth_password.

Probably easier than that is just to use "Mail - PEAR" instead of PHP's builtin mail function. That makes it easier to provide SMTP authentication.