[DEV] mail() function modification

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Groupe Eurower

    [DEV] mail() function modification

    Hi,

    I would like contribute to the PHP development but i don't really know where
    i can submit my codes !

    In fact, i'm a Web Hosting and i authorize the utilisation of the mail()
    function.

    Meanwhile, this function permit to send mail anonyme ! (the sender is the
    apache user in fact)
    This problem is twice:
    1: anonym mail can be sent
    2: in stats (mailog), the sender is always the apache user, so no true stats
    can be done

    My idea is to permit to set (true or 0) a variable in php.ini, in this case,
    the mail() function add a trace in headers (anti-spam) and add the 5th
    argument to the mail() function to force a really sender and no more apache
    Exemple: php.ini: mailtrace_login = "/home/%login%/www/"
    When the function is called:
    mail("nobody@ao l.com", "the subject", $message, "From:
    webmaster@$SERV ER_NAME", -flogin@$SERVERN AME);
    the 5th argument will be set to the %login% pattern found in the current
    directory of the script


    My code runs but some times it cause a stop PHP script and i don't know why
    !


    Thanks for your help !


Working...