WebDevStudios / NextGen-Public-Uploader

NextGEN Public Uploader is an extension to NextGEN Gallery which allows frontend image uploads for your users.
6 stars 10 forks source link

Better information with sent mail #29

Open tw2113 opened 11 years ago

tw2113 commented 11 years ago

User name/ID, image ID, etc

Example:

public function sendEmail() {
    global $wpdb;
    global $current_user;
    get_currentuserinfo();
    $gal_id = $_POST['galleryselect'];
    if(get_option('npu_notification_email')){
        $to = get_option('npu_notification_email');
        $subject = "New Image Pending Review - NextGEN Public Uploader";
        $message = "A new image has been submitted and is waiting to be reviewed.\r\n";
        $message .="Uploaded by $current_user->user_login, $current_user->display_name, $current_user->user_email.\r\n";
        $message .="To gallery: $gal_id \r\n";
        wp_mail( $to, $subject, $message);
    }
}