hello friends, I just want to ask if how i can send a message to any email address like yahoomail/googlemail after i submit the form,
example emails:
exezick143@gmai l.com // google mail,
exezick_85@yaho o.com //yahoo mail
message to send:
sender_name has been replied to your message.
to view it please go to: www.mypage.com/reply_message/ - (this is just a sample link)
any reply is appreciated. . .:) thank you :)
example emails:
exezick143@gmai l.com // google mail,
exezick_85@yaho o.com //yahoo mail
message to send:
sender_name has been replied to your message.
to view it please go to: www.mypage.com/reply_message/ - (this is just a sample link)
Code:
public function save_reply() { $theuser = $_POST['theuser']; $deskid = $_POST['deskid']; $message_reply = mysql_real_escape_string($_POST['message_reply']); $today = date("m/d/Y h:i:s a"); session_start(); $files = (isset($_SESSION['uploadedIMG']))?$_SESSION['uploadedIMG']:''; $assigned = mysql_fetch_array(mysql_query("SELECT * FROM across_help_desk WHERE help_desk_id='$deskid'")); $insert_reply = mysql_query("INSERT INTO across_help_confirm_message(help_desk_id,assigned,reply_message,sender,sender_status,message_status,attach,date) VALUES('$deskid','$assigned[assigned]','$message_reply','$theuser','1','1','$files','$today')"); /* code for sending message to email address. example emails: exezick143@gmail.com // google mail, exezick_85@yahoo.com //yahoo mail message to send: sender_name has been replied to your message. to view it please go to: www.mypage.com/reply_message/ - (this is just a sample link) */ if($insert_reply) { $bi = 0; $ass = mysql_query("SELECT * FROM across_help_confirm_message WHERE help_desk_id='$deskid'"); $count_help_id = mysql_num_rows($ass); $count_help_id = $count_help_id - 1; while($up_message = mysql_fetch_array($ass)) { if($bi < $count_help_id) { $mess_up = mysql_query("UPDATE across_help_confirm_message SET message_status='2' WHERE help_desk_id='$deskid' AND confirm_message_id='$up_message[confirm_message_id]'"); } $bi++; } if($mess_up) { echo 1;//successfully send } } else { echo 0; //not send } }
Comment