SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member Chimpie's Avatar
    Join Date
    Jan 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $notifyemail help

    Hey everyone. New member with what I hope is a simple question.

    I'm trying to set up a notifier for when a script runs via a cron job that it sends me an email. My website currently uses cPanel which I know has its own built in notifier, but I'm trying to create a customized response.

    Anyway, the partial script I'm using is:
    PHP Code:
    <?php

    // Notification information
    $notifyemail "email@domain.com"// Email address to send results

    // Send email
    {
        
    mail($notifyemail'Backup of Whatever.com is complete''Your weekly backup of Whatever.com has been completed and is ready to be downloaded.'); 
    }


    ?>
    The script this is embedded in runs fine, and it sends the email perfectly, but the From address is the address of the server, which uses the cPanel accounts username. To be this is not very smart.

    Is there a way I can customize the above script to change the From address to something else?

    Thanks!

  2. #2
    SitePoint Member Chimpie's Avatar
    Join Date
    Jan 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This issue has been resolved. Thanks for reading it though.


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
  •