Server IP : 162.240.98.243 / Your IP : 3.14.131.47 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/login.easenup.in/ |
Upload File : |
<?php function send_welcome_email_to_new_user($adminid) { $user = get_userdata($adminid); $EmailID = $user->EmailID; // for simplicity, lets assume that user has typed their first and last name when they sign up $user_full_name = $user->user_firstname . $user->user_lastname; // Now we are ready to build our welcome email $to = $EmailID; $subject = "Hi " . $user_full_name . ", welcome to our site!"; $body = ' <h1>Dear ' . $user_full_name . ',</h1></br> <p>Thank you for joining our site. Your account is now active.</p> <p>Please go ahead and navigate around your account.</p> <p>Let me know if you have further questions, I am here to help.</p> <p>Enjoy the rest of your day!</p> <p>Kind Regards,</p> <p>poanchen</p> '; $headers = array('Content-Type: text/html; charset=UTF-8'); if (wp_mail($to, $subject, $body, $headers)) { error_log("email has been successfully sent to user whose email is " . $EmailID); }else{ error_log("email failed to sent to user whose email is " . $EmailID); } } add_action('user_register', 'send_welcome_email_to_new_user'); ?>