我正在使用Mailtrap进行测试。我有一个包含电子邮件地址(收件人)和唯一数据的数组。
<img id="test" />
<p id="text"></p>
<script>
// config, modify your values here :)
let directory = "img/";
let nb_of_files = 100;
function getRandomInt(max) { // number between 1 & max
return ( Math.floor(Math.random() * Math.floor(max)) )+1;
}
let random_int = getRandomInt(100);
let img = document.getElementById('test');
img.src = directory + random_int +".jpg";
document.getElementById('text').innerHTML = "Image choosen is "+ img.src +"";
</script>
这是我到目前为止所得到的。数组存储在array:3 [
0 => array:3 [
"email" => "test1@email.com"
"report" => "Report 1"
"count" => "20"
]
1 => array:3 [
"email" => "test2@email.com"
"report" => "Report 3"
"count" => "10"
]
2 => array:3 [
"email" => "test3@email.com"
"report" => "Report 4"
"count" => "0"
]
]
变量中。
$items
它发送前2个报告,但出现错误“每秒电子邮件过多”。如何避免这些错误?还是有更好的方法?
答案 0 :(得分:1)