Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7888401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:49:21+00:00 2026-06-03T05:49:21+00:00

I am kinda new to PHP, so I now have started using Pear where

  • 0

I am kinda new to PHP, so I now have started using Pear where I want to use PHPUnit and other stuff.

I’ve encountered some errors, I’ve been looking through the internet to solve it, what I’ve figured out is that many people had this same problem, but had different sollutions to fix it.
I want to sent a message through PHP and get the result to see if it had been successfully sent, I’ve been looking through the tutorial: http://www.youtube.com/watch?v=UH90nGNXab0

this is the code:

    <?php
require_once "Mail.php";
$from = "picnicrus.ahmadhammad@gmail.com";
$to = "ahmadnassr@gmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "ssl://smtp.gmail.com";//"smtp.gmail.com";
$port = "465";//"587";
$username = "picnicrus.ahmadhammad";
$password = "1234432112344321";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp =@ Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = @$smtp->send($to, $headers, $body);

if (@PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>

I keep getting this warning: require_once(Mail.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\MailSender\MailSender.php on line 2

following by this fatal error: require_once() [function.require]: Failed opening required ‘Mail.php’ (include_path=’.;C:\wamp\bin\php\php5.3.10\pear’) in C:\wamp\www\MailSender\MailSender.php on line 2

So, my conclussion is that:

1) The include path in my php.ini in php isnt correct (include_path = “.;C:\wamp\bin\php\php5.3.10\pear”)
also my include_path in php.ini in apache is (include_path = “.;C:\wamp\bin\php\php5.3.10\pear”)
So I wonder if it might be wrong?

2) Or the package isnt correct installed, I have downloaded “Mail” with the following files: mail.php, mime.php, mimePart.php, mock.php, null.php, RFC822.php, sendmail.php, smtp.php, smtpmx.php.

And that directory is in “C:\wamp\bin\php\php5.3.10\pear”.

Regards
Alexein

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:49:23+00:00Added an answer on June 3, 2026 at 5:49 am

    Have you installed the Mail package? It sounded like you manually downloaded the files. If you have not installed the package, run the following command from a command prompt:

    pear install Mail
    

    That should put the Mail package into the correct pear library folder which should already be in your include_path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new here and kinda new to java. I've encountered a problem. I have
I have been using PHP 5+ for quite a while now. I am looking
Im new to php and have programmed in other languages. Im trying to solve
I'm kinda lost and need some help. In the past i have used php
I'm kinda new to Flex. I have trying to send Hash from Ruby on
I am kinda new to this Regex thing. When analyzing some code I frequently
I am kinda new to database designing so i ask for some advices or
What PHP code would be easiest to use if I want to create a
I have a PHP script that runs database queries. Now, if a query fails,
UPDATE 2: I have now removed the following from the .php file: <?php error_reporting(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.