Brad7928 Posted February 4, 2009 Share Posted February 4, 2009 Anyone know of a simple mail script that can pull data out of a form and send it to a local smtp server with authentication? Quote Link to comment https://forums.phpfreaks.com/topic/143851-php-mail-script-with-authentication/ Share on other sites More sharing options...
MadTechie Posted February 4, 2009 Share Posted February 4, 2009 php mail() does not support SMTP authentication, So you could try PEAR Mail or Use a socket connection.. if this sounds like too much hard work.. then get a copy of phpmailer and that will do it all for you including HTML email and attachments. Hope that Helps Quote Link to comment https://forums.phpfreaks.com/topic/143851-php-mail-script-with-authentication/#findComment-754828 Share on other sites More sharing options...
Brad7928 Posted February 4, 2009 Author Share Posted February 4, 2009 I know php mail() doesn't support AUTH LOGIN. I've tried this, but didn't work... http://www.codewalkers.com/c/a/Email-Code/Smtp-Auth-Email-Script/ I am using xampp on a windows box with php 5 and mySQL. 1. Where would i get PEAR mail from? (found one at pear.php.net but it's for 'nix systems) 2. How would i install it/intergrate it into my form? Quote Link to comment https://forums.phpfreaks.com/topic/143851-php-mail-script-with-authentication/#findComment-754831 Share on other sites More sharing options...
MadTechie Posted February 4, 2009 Share Posted February 4, 2009 the one at pear.php.net isn't just for *nix.. just install but your need to install PEAR as well.. if the example in the link supplied "doesn't work" then phpmailer probably won't work either, your need to check sockets are installed, check your phpinfo(); PS: saying "doesn't work" and giving no other info is kinda usless to anyone try to help. it would be like me saying "yes it does!" Quote Link to comment https://forums.phpfreaks.com/topic/143851-php-mail-script-with-authentication/#findComment-754848 Share on other sites More sharing options...
Brad7928 Posted February 5, 2009 Author Share Posted February 5, 2009 Ok, so what i meant by doesn't work is: I fill in the form, the php script grabs the info it needs from the form, but doesn't send it to the mail server, yet i get redirected to the success page. At the moment i am trying out phpmailer. I'll keep you posted. Quote Link to comment https://forums.phpfreaks.com/topic/143851-php-mail-script-with-authentication/#findComment-754856 Share on other sites More sharing options...
Brad7928 Posted February 5, 2009 Author Share Posted February 5, 2009 Trying to get the setting right for PHPmailer. it's told me that: To be fully functional, include: phpmailer-fe.php class.phpmailer.php in the _lib/ directory and set the basic settings. Strategies employed in this sample form: * phpmailer-fe.php is in the _lib/ directory * class.phpmailer.php is in the _lib/ directory - means phpmailer-fe.php will use class.phpmailer.php to handle the sending of data But i look in the /lib file, and there is no file called class.phpmailer.php My phpinfo tells me that socket support is enabled. Any idea's? Quote Link to comment https://forums.phpfreaks.com/topic/143851-php-mail-script-with-authentication/#findComment-754954 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.