I have created a automatic mail with some texts,tables and charts. The charts are designed using quickcharts and used following method.
$chartConfig= "{
type: 'line',
data: {
labels: [$date_array2],
datasets: [{
data: [$value_array2],
backgroundColor: ['#F5DEB3'],
}]
},
options: {
title: {
display: true,
text: 'UGW Peak Throughput in Malabe_LD_vUGW, in Gbps',
},
legend: {
display: false
}
}
}";
$url1 = 'https://quickchart.io/chart?w=500&h=200&c=' . urlencode($chartConfig);
$messagenew.= "Chart :<br><br><img src=\"$url1 \">
I am getting the email correctly. But the issue is I cannot see the chart directly. Every time I need to click download image to see the chart. Further I am using VPN connection to see the mails and I cannot see the images(even though it has downloaded). Without VPN connection I can see the images after downloading.
Can someone propose any better way to get charts attached to emails in PHP?