trying to email in php. getting an error with NET_SMTP.

Category: Phpbb

InMotionFans
n/a Points
Asked:
2014-03-24 3:14 pm EST

Hits: 96
looks as if 'Net_SMTP' is not in correct directory or php ini does not includes the correct directory.
I'm getting the following error :
Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/local/lib/php/Mail/smtp.php on line 348

Warning: include_once(): 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 348

Fatal error: Class 'Net_SMTP' not found in /usr/local/lib/php/Mail/smtp.php on line 349

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JacobIMH
Staff
9,968 Points
2014-03-24 3:45 pm EST
Hello, and thanks for the question.

I did some digging around and I stumbled across this obsolete construction of NET_SMTP PEAR PHP bug . It looks like since PHP 5.4 the Net_SMTP line can't have the & symbol in it.

I'd recommend either using phpMailer to send mail from PHP, or you could run multiple versions of PHP on your account and from the directory that you're trying to run your mail script use this line in your.htaccess file:

AddHandler application/x-httpd-php5 .php


It looks like that PEAR bug is still open and hasn't been resolved yet, so these would probably be your best alternatives for getting email working from PHP.

Please let us know if you're still having any issues at all.

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!