SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: PEAR mail

  1. #1
    SitePoint Evangelist chiphunt1's Avatar
    Join Date
    Oct 2003
    Location
    louisville, ky
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking PEAR mail

    I'm using a form to get a users name, email, and a file to attach to an email. Then send the email using the PEAR class. PEAR is installed on my server. This is the code I'm using in my php file:

    PHP Code:

    require_once('/usr/lib/php/Mail/Mail.php'); // These two files are part of   
    require_once('Mail/Mime.php'); // Pear, and are required for the Mail_Mime class 
    I get this error when I submit the form:

    Warning: main(Mail.php) [function.main]: failed to create stream: No such file or directory in /usr/lib/php/Mail/Mail.php on line 21

    Fatal error: main() [function.main]: Failed opening required 'Mail.php' (include_path='.:/usr/lib/php') in /usr/lib/php/Mail/Mail.php on line 21

    When I went into the directory where Mail.php is, I noticed first that it is there, but it is not capitalized, so I changed the php file to require_once('...../mail.php') and still got the same error. Also I can't find Mail/Mime.php anywhere. I didn't install PEAR, but it is there. Any suggestions?

  2. #2
    SitePoint Member
    Join Date
    Oct 2004
    Location
    San Francisco
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PEAR mime Mail

    If you are using your ISP's installation, they may not have installed Mail_mime. Contact them and see if they will install it. In any case, just because PEAR is installed, doesn't mean Mail is installed (though is sounds like it is), and that doesn't mean Mail_mime is installed (separate sub package). Same thing happened to me. I installed PEAR on my server (in my root directory) and had to install Mail_mime separately. By then, my ISP got back to me and said they would install it and they did...hope that helps.

    Maddlake


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •