Welcome to WebmasterWorld Guest from 23.22.182.29

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Configure PHP for send mail

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

New User

5+ Year Member

joined:Jan 24, 2011
posts: 7
votes: 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
5:02 pm on Feb 14, 2011 (gmt 0)

Senior Member

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

joined:Nov 28, 2004
posts:7999
votes: 0


Why can't you use the mail()function [us3.php.net]?
5:57 pm on Mar 2, 2011 (gmt 0)

New User

5+ Year Member

joined:Jan 24, 2011
posts: 7
votes: 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
3:56 am on Mar 4, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 1, 2003
posts:815
votes: 0


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.