我试图发布一组未发送到服务器的数据:
网络服务:
deleteCategory() {
return this.http.post('http://www.demo/webapi/deletecategory', {
headers: {
"Authorization": "Token " + this.token,
"Content-Type": "application/x-www-form-urlencoded"
},
withCredentials: true
}
)
}
Run Code Online (Sandbox Code Playgroud)
在 ts 文件中
onDelete() {
this.userService.deleteCategory().subscribe(response => {
this.selectedArray = [];
for (var i = 0; i< this.selection._selected.length; i++){
this.selectedArray.push(this.selection._selected[i].category_id) ;
console.log(' selected value:', this.selectedArray);
}
})
}
Run Code Online (Sandbox Code Playgroud)
在 html 中
<button class="btn-danger pull-right" (click)="onDelete()" type="button" >Delete</button>
Run Code Online (Sandbox Code Playgroud) 我尝试使用 Laravel 队列作业和 Hostmonster Web 服务器上的网站发送邮件,但当我触发时它不会发送邮件php artisan queue:work,它会清除作业表,但不会清除收到到我的电子邮件地址的邮件。
这是我的排队和发送邮件功能的代码:
//It is working
$to = '****@g***l.com';
\Mail::to($to)->send(new ContactUsMail($contactUsId));
//It is not working: on same host email working not work with hotmail - gmail - other
$to = '****@g***l.com';
\Mail::to($to)->queue(new ContactUsMail($contactUsId));
Run Code Online (Sandbox Code Playgroud)
邮件发送工作正常,有两种情况:
send()方法发送邮件(绕过/忽略队列)queue()发送到同一托管电子邮件(如info@myhost.com)但现在如果我使用xyz@yahoo.com/xyz@gmail.com那么在这种情况下队列不起作用 - 作业表也会删除发送邮件时的条目,但宾果..!! 邮件发到哪里我不知道。
另外 cron mail 与队列简单mail()功能相同的问题在那里工作但Mail::send()在那里不起作用..!
我用这个制作了一个全局模式
<div id="GlobalModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<style>
#GlobalModal .modal-body .body-content {
margin:0;
width: 100%;
}
</style>
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header" style="background:#337ab7;">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" style="color:white">Not set...</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-warning" data-dismiss="modal">Close</button>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
这是我调用模态的按钮
<button id="new-communication" type="button" class="btn btn-info btn-sm">NEW <i class="glyphicon glyphicon-plus"></i></button>
Run Code Online (Sandbox Code Playgroud)
这是内容
<div class="hidden">
<div id="mc-communication">
<form id="loginForm" class="form-horizontal" role="form" method="POST" action="" >
<div class="form-group">
<label class="col-sm-2 control-label">Type</label>
<div …Run Code Online (Sandbox Code Playgroud) php ×2
angular ×1
angular-http ×1
css ×1
email ×1
http-post ×1
javascript ×1
jquery ×1
laravel ×1
laravel-mail ×1