glitch003 Posted March 29, 2010 Share Posted March 29, 2010 Hi, I'm trying to send an email with a php script but the SMTP server requires authentication so I can't use PHP's built in mail() function. So I'm trying to use the pear mail packages to send the messages but I'm getting a bunch of errors. Here's the tutorial that I followed and my code looks basically identical to this: http://www.cyberciti.biz/tips/howto-php-send-email-via-smtp-authentication.html and these are the errors I get when I run the script via my mail form: Warning: include_once(Net/SMTP.php) [function.include-once]: failed to open stream: No such file or directory in /usr/local/lib/php/Mail/smtp.php on line 206 Warning: include_once() [function.include]: Failed opening 'Net/SMTP.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/local/lib/php/Mail/smtp.php on line 206 Fatal error: Class 'Net_SMTP' not found in /usr/local/lib/php/Mail/smtp.php on line 210 Does anyone know what's causing these errors and how I can fix them? Is there another package I can use or is pear not properly installed or what? Thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/196841-email-form-problems/ Share on other sites More sharing options...
mmarif4u Posted March 29, 2010 Share Posted March 29, 2010 Did you include the correct scripts in your mail script for calling classes/functions. Can you post your mail code and what you downloaded for Pear and from where. Quote Link to comment https://forums.phpfreaks.com/topic/196841-email-form-problems/#findComment-1033341 Share on other sites More sharing options...
andrewgauger Posted March 29, 2010 Share Posted March 29, 2010 You might have to download and install the pear package: http://pear.php.net/package/Net_SMTP/download Quote Link to comment https://forums.phpfreaks.com/topic/196841-email-form-problems/#findComment-1033351 Share on other sites More sharing options...
oni-kun Posted March 29, 2010 Share Posted March 29, 2010 If you don't have SSH access, you can hit manual install on the PEAR library and plug it in manually to your script's directory. Quote Link to comment https://forums.phpfreaks.com/topic/196841-email-form-problems/#findComment-1033356 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.