prefix.'Appointments'; $userid=$_REQUEST['userid']; $username = $wpdb->get_var("SELECT user_login FROM {$wpdb->users} WHERE ID = '{$userid}'"); get_currentuserinfo(); $user=$current_user->user_login; $admin_email = get_option('email_address'); $res=$wpdb->get_results("SELECT * from $table WHERE appointment_id='".$id."'"); foreach($res as $val){ $a=$val->email_id; } $path = $this->options['upload_image']; $img = ""; $url=site_url(); //$logourl=plugins_url(); /* Change your message body in the given $subjectPara variables. $subjectPara1 means 'first paragraph in message body', $subjectPara2 means'first paragraph in message body', if you don't want more than 1 para, just put NULL in unused $subjectPara variables. */ $subtitle="Hi Admin"; $subjectPara1 = 'Appointment successfully removed by '.$username.'.'; $subjectnote = "Thank you"; $message = ''. ''. ''. 'Email notification'. ''. ''. ''. '
'. '
'. '

'.$subtitle.'

'. '

'.$subjectPara1.'

'. '

'.$subjectnote.'

'. '
'. '
'. ''. ''; /*EMAIL TEMPLATE ENDS*/ $to = $admin_email; // give to email address $subject = 'Remove notification'; //change subject of email // mandatory headers for email message, change if you need something different in your setting. $headers = "From: " . $a . "\r\n"; $headers .= "Reply-To: ". $a . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; print($message); die(); //die($message); // Remember, mail function may not work in PHP localhost setup but the email template can be used anywhere like (PHPmailer, swiftmailer, PHPMail classes etc.) // Sending mail wp_mail($to, $subject, $message, $headers); ?>