#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    32
    Rep Power
    3

    PHP error when sending emails


    Hi


    I have installed email script on a server but when i try to send emails i am receiving this error:

    Fatal error: require_once() [function.require]: Failed opening required '/srv/disk11/1171009/www/websoftwareoutsourcing.com/inter/admin/functions/api/module_factory.php' (include_path='.:/usr/local/php5/share/pear') in /srv/disk11/1171009/www/websoftwareoutsourcing.com/inter/admin/functions/api/module_trackerfactory.php on line 17

    Does anyone have an idea what this error could mean?

    Thanks!
  2. #2
  3. Jealous Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,304
    Rep Power
    9400
    Does that file exist? PHP doesn't think so. Or at least it doesn't think it can open it.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    15
    Rep Power
    0
    The problem seems to be that PHP use the ini directive sendmail_from to set the from email address in the SMTP protocol. If this is not correctly set, or if it does not match the from header in the email headers, the email is caught by spam protection software. The simplest solution is to set the directive during execution:

    ini_set("sendmail_from", $email_from);

    $headers = "From: $email_from";

    mail($to, $subject, $message, $headers);

    Comments on this post

    • gw1500se disagrees : This reply is a non sequitor. The problem is as requinix implied and clearly indicated by the error message. The 'require_once' file cannot be found/opened.
  6. #4
  7. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,556
    Rep Power
    2338
    /srv/disk11/1171009/www/websoftwareoutsourcing.com/inter/admin/functions/api/module_factory.php
    Well color me shocked
    I ♥ ManiacDan & requinix

    This is a sig, and not necessarily a comment on the OP:
    Please don't be a help vampire!
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    119
    Rep Power
    0

    Solutions of the problem.


    Dear friend

    It seems required file does not exist in the specified directory.

    Thanks
    Diya
  10. #6
  11. Confused badger
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    1,184
    Rep Power
    492
    Originally Posted by AimyThomas
    Fatal error: require_once() [function.require]: Failed opening required '/srv/disk11/1171009/www/websoftwareoutsourcing.com/inter/admin/functions/api/module_factory.php' (include_path='.:/usr/local/php5/share/pear') in /srv/disk11/1171009/www/websoftwareoutsourcing.com/inter/admin/functions/api/module_trackerfactory.php on line 17

    Does anyone have an idea what this error could mean?
    A great example of "Reading the error message fail".
    "For if leisure and security were enjoyed by all alike, the great mass of human beings who are normally stupefied by poverty would become literate and would learn to think for themselves; and when once they had done this, they would sooner or later realise that the privileged minority had no function and they would sweep it away"
    - George Orwell, 1984

IMN logo majestic logo threadwatch logo seochat tools logo