在Outlook中基于已选择的电子邮件发送电子邮件

时间:2019-03-03 21:31:11

标签: php sql function outlook href

我正在尝试使用Outlook桌面弹出窗口来单击链接时发送电子邮件,我可以使用此功能,但是我不想将其发送到代码中手动输入的电子邮件中,而是希望将其发送到选定的电子邮件中。 目前,当用户单击按钮时,它会发送一个ID,但我希望它也发送电子邮件。

下面的代码显示一个数据表,当用户单击“拒绝”时,它将发送ID并更新表中的数据,如果可能的话,我希望它与ID一起发送电子邮件

<script type="text/javascript">
    function sureToReject(id,email){
		if(confirm("Are you sure you want to reject this booking?")){
			window.location.href ='Breject.php?id='+id+''+'email='+email;
		}
	}    
    </script>


<tr>
	<td><input type="checkbox" class="checkbox" /></td>
            <td><?php echo $row['customer_ID'] ?></td>
	<td><?php echo $row['Name'] ?></td>
	<td><?php echo $row['Email'] ?></td>
	<td><?php echo $row['booking_date'] ?></td>
	<td><?php echo $row['booking_time'] ?></td>
            <td><?php echo $row['attendee_no'] ?></td>
            <td><?php echo $row['booking_reason'] ?></td>
            <td><?php echo $row['comments'] ?></td>
            <!-- calls the javascript function above to change 'status' column in booking table -->
          <!--  <td><a href="javascript:sureToApprove(<?php echo $row['customer_ID'];?>)" class="ico del" >Approve</a><br> &nbsp;&nbsp;<a href="javascript:sureToReject(<?php echo $row['customer_ID'];?>)" class="ico edit">Delete</a></td> -->
    <td class="text-center">
            <a class='btn btn-info btn-xs' href="javascript:sureToApprove(<?php echo $row['customer_ID'];?>)" >
                <span class="glyphicon glyphicon-edit"></span> Yes</a> 
                <a href="javascript:sureToReject(<?php echo "{$row['customer_ID']}, '{$row['Email']}'";?>)" class="btn btn-danger btn-xs">
                    <span data-toggle="modal" data-target="#rejectModal">
                        
</span> No</a>
       
        </td>
        
        
        </tr>
            

下面的文件将更新表格,并显示一个弹出窗口,允许用户发送电子邮件,在这里,我希望用户单击链接以弹出窗口时显示已传递的电子邮件

   
    <?php
    
include 'config.php';
$id = $_REQUEST['id'];
   $email = $_REQUEST['email'];
$query = "UPDATE booking SET status = 'REJECTED' WHERE customer_ID = '$id'";
$result = $conn->query($query);
if($result === TRUE){
	echo '';
?>
	
<?php
}
?>
  <form >
    <label type="text"  cass="fadeIn second" name="username" placeholder="User Name ">Booking has been rejected!</label>
    <label type="password" id="password" class="fadeIn third" name="password" placeholder="password">To email the customer for confirmation of rejection please click below!</label>
  <br>
                 <!--   <input href="emp_details_load.php"type = "submit" class="fadeIn fourth" value = " Submit "/><br /> -->
  <a href="<? php echo $email; ?>;subject=Booking request for O Driscolls Pub&body=Booking request for O Driscolls Pub">Send me an email</a>
</form>

有人对我如何做到这一点有意见

0 个答案:

没有答案