Export List of all Associated resources in Azure - export-to-excel

Does anyone know of a way to export a list (preferably xlsx) of all resources and their associations.
For example I would like to know in one row on a spreadsheet the name of a VM, virtualNIC, StorageAccount, vNet, ResourceGroup, SecurityGroup and any other resource associated with the VM itself.
The purpose is to see at a glance how all resources are associated so for example if I added port rules to a SecurityGroup I would be able to see all other resources affected.
Cheers

You can use a script like this
Login-AzureRmAccount
Function Dump-VirtualMachinesV1($outputPath) {
$VMs = Find-AzureRmResource -ResourceType 'Microsoft.ClassicCompute/virtualMachines' -ExpandProperties | Sort-Object ResourceName
$output = "Name,Location,IP,VNET,OS,Azure Size,Core,RAM,OS Disks,Temp Disk,Data Disks (TB),Resource Groups,C (OS),Temp, Data,Storage Account,Diagnostics Storage Account,Endpoints,Status,VIP`n"
foreach ( $vm in $VMs ) {
$vmSize = FixSize($vm.Properties.HardwareProfile.Size)
$vmCores = (GetVmConfig($vm.Properties.HardwareProfile.Size)).Cores
$vmRAM = (GetVmConfig($vm.Properties.HardwareProfile.Size)).RAM
$diagnosticsStorageAccount = GetDiagnosticsStorageAccount($VM.Properties)
$endpoints = GetEndpoints($vm.Properties)
$output += $vm.Name + "," +`
$vm.Location + "," +`
$vm.Properties.InstanceView.PrivateIpAddress + "," +`
$vm.Properties.NetworkProfile.VirtualNetwork.Name + "," +`
$vm.Properties.StorageProfile.OperatingSystemDisk.OperatingSystem + "," +`
$vmSize + "," +`
$vmCores + "," +`
$vmRAM + "," +`
"1," +`
"1," +`
$vm.Properties.StorageProfile.DataDisks.Count + "," +`
$vm.ResourceGroupName + "," +`
$vm.Properties.DomainName.Name + "," +`
"," +`
"," +`
$vm.Properties.StorageProfile.OperatingSystemDisk.StorageAccount.Name + "," +`
$diagnosticsStorageAccount + "," +`
$endpoints + "," +`
$vm.Properties.InstanceView.Status + "," +`
$vm.Properties.InstanceView.PublicIpAddresses + "`n"
}
$output | Out-File -Encoding ascii $outputPath
}
Function Dump-VirtualMachinesV2($outputPath) {
$VMs = Find-AzureRmResource -ResourceType 'Microsoft.Compute/virtualMachines' -ExpandProperties | Sort-Object ResourceName
$output = "Name,Location,IP,VNET,OS,Azure Size,Core,RAM,OS Disks,Temp Disk,Data Disks (TB),Cloud Services,C (OS),Temp, Data,Storage Account,Diagnostics Storage Account,Endpoints,Status,VIP`n"
foreach ( $vm in $VMs ) {
$vmSize = FixSize($vm.Properties.HardwareProfile.VMSize)
$vmCores = (GetVmConfig($vm.Properties.HardwareProfile.VMSize)).Cores
$vmRAM = (GetVmConfig($vm.Properties.HardwareProfile.VMSize)).RAM
$diagnosticStorageAccount = GetDiagnosticsStorageAccount($vm.Properties)
$endpoints = GetEndpoints($vm.Properties)
$vm.Properties.StorageProfile.OsDisk.VHD -match "https*://(\w+)"
$osStorageAccount = $matches[1]
$output += $vm.Name + "," +`
$vm.Location + "," +`
$vm.Properties.InstanceView.PrivateIpAddress + "," +`
$vm.Properties.NetworkProfile.VirtualNetwork.Name + "," +`
$vm.Properties.StorageProfile.OsDisk.OsType + "," +`
$vmSize + "," +`
$vmCores + "," +`
$vmRAM + "," +`
"1," + `
"1," + `
$vm.Properties.StorageProfile.DataDisks.Count + "," +`
$vm.Properties.DomainName.Name + "," + `
"," + `
"," + `
"," + `
$osStorageAccount + "s," +`
$diagnosticsStorageAccount + "," +`
$endpoints + "," +`
$vm.Properties.InstanceView.Status + "," +`
$vm.Properties.InstanceView.PublicIpAddresses + "`n"
}
$output | Out-File -Encoding ascii $outputPath
}
Function FixSize ($size) {
Switch ($size) {
'Extra Small' {$size = 'Standard_A0'}
'Small' {$size = 'Standard_A1'}
'Medium' {$size = 'Standard_A2'}
'Large' {$size = 'Standard_A3'}
'Extra Large' {$size = 'Standard_A4'}
}
return $size
}
Function GetVmConfig($size) {
$size = FixSize($size)
$vmConfig = #{"Cores" = 0; "RAM" = 0}
switch -Regex ($size) {
"A0$" {$vmConfig = #{"Cores" = 1; "RAM" = 0.75}}
"A1$" {$vmConfig = #{"Cores" = 1; "RAM" = 1.75}}
"A2$" {$vmConfig = #{"Cores" = 2; "RAM" = 3.5}}
"A3$" {$vmConfig = #{"Cores" = 4; "RAM" = 7}}
"A4$" {$vmConfig = #{"Cores" = 8; "RAM" = 14}}
"A5$" {$vmConfig = #{"Cores" = 2; "RAM" = 14}}
"A6$" {$vmConfig = #{"Cores" = 4; "RAM" = 28}}
"A7$" {$vmConfig = #{"Cores" = 8; "RAM" = 56}}
"A8$" {$vmConfig = #{"Cores" = 8; "RAM" = 56}}
"A9$" {$vmConfig = #{"Cores" = 16; "RAM" = 112}}
"A10$" {$vmConfig = #{"Cores" = 8; "RAM" = 56}}
"A11$" {$vmConfig = #{"Cores" = 16; "RAM" = 112}}
"DS?1(_v2)?$" {$vmConfig = #{"Cores" = 1; "RAM" = 3.5}}
"DS?2(_v2)?$" {$vmConfig = #{"Cores" = 2; "RAM" = 7}}
"DS?3(_v2)?$" {$vmConfig = #{"Cores" = 4; "RAM" = 14}}
"DS?4(_v2)?$" {$vmConfig = #{"Cores" = 8; "RAM" = 28}}
"DS?5(_v2)?$" {$vmConfig = #{"Cores" = 16; "RAM" = 56}}
"DS?11(_v2)?$" {$vmConfig = #{"Cores" = 2; "RAM" = 14}}
"DS?12(_v2)?$" {$vmConfig = #{"Cores" = 4; "RAM" = 28}}
"DS?13(_v2)?$" {$vmConfig = #{"Cores" = 8; "RAM" = 56}}
"DS?14(_v2)?$" {$vmConfig = #{"Cores" = 16; "RAM" = 112}}
"GS?1$" {$vmConfig = #{"Cores" = 2; "RAM" = 28}}
"GS?2$" {$vmConfig = #{"Cores" = 4; "RAM" = 56}}
"GS?3$" {$vmConfig = #{"Cores" = 8; "RAM" = 112}}
"GS?4$" {$vmConfig = #{"Cores" = 16; "RAM" = 224}}
"GS?5$" {$vmConfig = #{"Cores" = 32; "RAM" = 448}}
}
return $vmConfig
}
Function GetVip($properties) {
$vip = ''
$inputEndpoints = $properties.NetworkProfile.InputEndpoints
if ($inputEndpoints.Count -gt 0) {
$vip = $inputEndpoints[0].publicIpAddress
}
return $vip
}
Function GetEndpoints($properties) {
$endpoints = ''
$inputEndpoints = $properties.NetworkProfile.InputEndpoints
if ($inputEndpoints.Count -gt 0) {
$endpoints += $inputEndpoints.PublicPort + ' '
}
return $endpoints
}
Function GetDiagnosticsStorageAccount($properties) {
$storageAccount = ''
foreach ($extension in $properties.Extensions) {
if ($extension.Extension -eq 'IaaSDiagnostics') {
$storageAccount = $extension.Parameters.Public.StorageAccount
}
}
return $storageAccount
}
$outputPathV1 = "c:\temp\Azure\Q2-VMv1.csv"
$outputPathV2 = "c:\temp\Azure\Q2-VMv2.csv"
Dump-VirtualMachinesV1($outputPathV1)
Dump-VirtualMachinesV2($outputPathV2)

Related

Record counter by condition in one query

Is there a way to count the reviews by rating count before calling the get (-> get) method to get all those counters by querying the database without any calculations on the server? My solution at the moment:
$allReviews = Review::query()
->where('product_id', $data['product_id'])
->whereNotNull('published_at')
->get();
$fiveStars = count($allReviews->where('rating', 5));
$fourStars = count($allReviews->where('rating', 4));
$threeStars = count($allReviews->where('rating', 3));
$twoStars = count($allReviews->where('rating', 2));
$oneStar = count($allReviews->where('rating', 1));
$overallRating = ($fiveStars * 5 + $fourStars * 4 + $threeStars * 3 + $twoStars * 2 + $oneStar) / (($fiveStars + $fourStars + $threeStars + $twoStars + $oneStar));
You could use groupBy and pluck:
$ratings = Review::query()
->selectRaw('rating, COUNT(*) as amount')
->where('product_id', $data['product_id'])
->whereNotNull('published_at')
->groupBy('rating')
->pluck('amount', 'rating');
$fiveStars = $rating[5] ?? 0;
$fourStars = $rating[4] ?? 0;
$threeStars = $rating[3] ?? 0;
$twoStars = $rating[2] ?? 0;
$oneStar = $rating[1] ?? 0;

How can I optimise my code using "For-Loop"?

I am trying to develop a code which calculates Local Density of states of electrons in a material. For which I am using a multiple for loops and multiple tables. it takes 45sec to complete, I need less time for that. any suggestions how to optimize this code.
AbsoluteTiming[Ns=2; \[Eta] = 0.001;
Nx=15;
Ny=15;
NN=Nx*Ny;
Nband=8;
kkmx = Ns*Nx;
kkmy = Ns*Ny;
wmax = 0.2; nw = 800; p = 0;
Print["starting ldos calc"];
nsite = 2;
ldos = 0;
For[kx = 0, kx <= (Ns - 1.)*2*(Pi/kkmx), kx += 2*(Pi/kkmx),
For[ky = 0, ky <= (Ns - 1.)*2*(Pi/kkmy), ky += 2*(Pi/kkmy),
ES = Eigensystem[H];
elist = Table[ES[[1,l]], {l, 1, Nband/2*4*NN}];
ulist = Table[Abs[ES[[2,l,i]]]^2, {l, 1, Nband/2*4*NN}, {i, 388+1, 388+(nsite - 1)*Nband/2 + Nband/2}];
vlist = Table[Abs[ES[[2,l,i + Nband/2*NN*2]]]^2, {l, 1, Nband/2*4*NN}, {i, 388+1, 388+(nsite - 1)*Nband/2 + Nband/2}];
ldossc = Table[Im[Total[Table[ulist[[l,1 ;; All]]*(1/(-wmax + wmax*2*(w/nw) - elist[[l]] + I*\[Eta])) +
vlist[[l,1 ;; All]]*(1/(-wmax + 2*wmax*(w/nw) + elist[[l]] + I*\[Eta])), {l, 1, Nband/2*4*NN}]]], {w, 0, nw}]; ldos = ldos + ldossc;
Export["ldosorb_up_P.dat", Table[{-wmax + wmax*2*(\[Omega]/nw), (-Pi^(-1))*(ldos[[\[Omega] + 1,i]]/Ns^2)}, {\[Omega], 0, nw}, {i, 1,8}]];
(* Export["ldostot.dat", Table[{-wmax + wmax*2*(\[Omega]/nw), (-Pi^(-1))*((ldos[[\[Omega] + 1,i]] + ldos[[\[Omega] + 1,i + 1]] + ldos[[\[Omega] + 1,i + 2]] + ldos[[\[Omega] + 1,i + 3]] + ldos[[\[Omega] + 1,i + 4]])/Ns^2)}, {\[Omega], 0, nw}, {i, 1, (nsite - 1)*Nband/2 + Nband/2 - 4}]]; *)
Print["kx=", kx, " ky=", ky, " nsx=", (kx/(2*Pi))*kkmx + 1.]; ]; ]; ]```

Get attribute or elements from page by script in nightwatch

I need a check that class elements was ui-state-active.
class="ui-state-default ui-state-active" href="#">15</a>
I am trying to using all methods and don't undestand how to write a code:
.perform(function () {
var arrAttr = [];
var arrCssProp = [];
var arrValue= [];
for (i = 1; i < 8; i++) {
for (j = 1; j < 7; j++) {
browser.useXpath();
browser.getCssProperty('//*[#id="ui-datepicker-div"]/table/tbody/tr[' + i + ']/td[' + j + ']', '.ui-state-default', function (result) {
arrCssProp[j, i] = result.value;
});
browser.getAttribute('//*[#id="ui-datepicker-div"]/table/tbody/tr[' + i + ']/td[' + j + ']', '.ui-state-default', function (result) {
arrAttr[j, i] = result.value;
});
browser.getValue('//*[#id="ui-datepicker-div"]/table/tbody/tr[' + i + ']/td[' + j + ']', '.ui-state-default', function (result) {
arrValue[j, i] = result.value;
});
browser.useCss();
writeLogLine('arrAttr:' + i + "|" + j + ' :' + arrAttr);
console.log('arrAttr:' + i + "|" + j + ' :' + arrAttr);
writeLogLine('arrCssProp:' + i + "|" + j + ' :' + arrCssProp);
console.log('arrCssProp:' + i + "|" + j + ' :' + arrCssProp);
writeLogLine('arrValue:' + i + "|" + j + ' :' + arrValue);
console.log('arrValue:' + i + "|" + j + ' :' + arrValue);
}
}
})
To get the attribute of class, you can write similar code
browser.getAttribute(pageObject.getElement('#ui'), "class", function (result) {
if (result.value.indexOf("ui-state-active")!=-1) {
console.log('class name:' + result.value);
}
else { console.log('class name:' + result.value); }});
You can use any locator strategy. To use CSS strategy based on class name, use .ui-state-default along with tagname.
Hope this helps.
Like in Rohit's example, if you want to use an attribute value, all the commands that rely on it need to be inside the callback. Doing arrCssProp[j, i] = result.value; won't work, since that value will disappear as soon as you exit the callback.
For more info, check out https://github.com/nightwatchjs/nightwatch/wiki/Understanding-the-Command-Queue

Calculate new release time for files

We have some code that checks each incoming file against 3 different criteria before processing (Not a weekend, not after 6pm, not a holiday). This being said, I need to figure out how to have it check for a half hour now (bolded part). I have tried adding a + mRelease > 30 as well as AND mRelease > 30 and both have failed. I have been altering this line
Do While (WeekDay(dRelease) = 1) OR (WeekDay(dRelease) = 7) OR (UBound(fHoliday) > -1) OR (tRelease >17)
Here is the code currently in place:
result = ""
dRelease = Now
tRelease = CStr(Hour(Now))
mRelease = CStr(Minute(Now))
aHoliday = Array("01/02/2017","01/16/2017","05/29/2017","07/04/2017","09/04/2017","10/09/2017","11/23/2017","11/24/2017","12/25/2017","12/26/2017")
dNow = CStr(DatePart("m",Date)) + "/" + CStr(DatePart("d",Date)) + "/" + CStr(DatePart("yyyy",Date))
dMonth = "0" + CStr(Month(dRelease))
dDay = "0" + CStr(Day(dRelease))
dYear = CStr(Year(dRelease))
fHoliday = Filter(aHoliday,Right(dMonth,2) + "/" + Right(dDay,2) + "/" + dYear)
'fHoliday = Filter(aHoliday,dNow)
'result = UBound(fHoliday)
'result = Left(dRelease,10)
'result = CStr(DatePart("m",Date)) + "/" + CStr(DatePart("d",Date)) + "/" + CStr(DatePart("yyyy",Date))
'While release date is a weekend, or release date is a holiday
Do While (WeekDay(dRelease) = 1) OR (WeekDay(dRelease) = 7) OR (UBound(fHoliday) > -1) OR (tRelease >17)
'increase release date by 1
dRelease = dRelease + 1
'result = dRelease
'check for holiday
dMonth = "0" + CStr(Month(dRelease))
dDay = "0" + CStr(Day(dRelease))
dYear = CStr(Year(dRelease))
'fHoliday = Filter(aHoliday,Left(dRelease,10))
fHoliday = Filter(aHoliday,Right(dMonth,2) + "/" + Right(dDay,2) + "/" + dYear)
tRelease = 00
Loop
'Format the release date to the Esker deferred date/time standard.
dMonth = "0" + CStr(Month(dRelease))
dDay = "0" + CStr(Day(dRelease))
dYear = CStr(Year(dRelease))
dtCurrent = Right(dMonth,2) + "/" + Right(dDay,2) + "/" + dYear
If dRelease > Now Then
tRelease = "00:" + mRelease
Else
tRelease = CStr(Hour(Now)) + ":" + CStr(Minute(Now))
End If
result = dtCurrent + " " + tRelease
Change this:
Do While (WeekDay(dRelease) = 1) OR (WeekDay(dRelease) = 7) OR (UBound(fHoliday) > -1) OR (tRelease >17)
...
Loop
into this:
If (WeekDay(dRelease) = 1) Or (WeekDay(dRelease) = 7) Or (UBound(fHoliday) > -1) Or (Time > CDate("16:30")) Then
...
End If

Simplifying Code with For or While to Export Various Variable of a Table

Is there a way to simplify this code?
Basically is a script to export a table from Google Sheets and send it via email. But it's not a clean script, although it works.
If there is anyway of making it more simple, or instead of get all the values get the complete table and then export, that would be much more clean.
function sendFuelcount() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
sheet.setActiveSheet(sheet.getSheets()[0]);
var nom0 = sheet.getRange("A1").getValue();
var fuel0 = sheet.getRange("D1").getValue();
var line0 = nome0 + "\t\t" + fuel0;
var nom1 = sheet.getRange("A2").getValue();
var fuel1 = sheet.getRange("D2").getValue();
var data1 = sheet.getRange("C2").getValue();
var line1 = nom1 + "\t" + fuel1 + "\t\t" + "Em: " + data1;
var nom2 = sheet.getRange("A3").getValue();
var fuel2 = sheet.getRange("D3").getValue();
var data2 = sheet.getRange("C3").getValue();
var line2 = nom2 + "\t\t" + fuel2 + "\t\t" + "Em: " + data2;
var nome3 = sheet.getRange("A4").getValue();
var fuel3 = sheet.getRange("D4").getValue();
var data3 = sheet.getRange("C4").getValue();
var line3 = nome3 + "\t\t" + fuel3 + "\t\t" + "Em: " + data3;
var nome4 = sheet.getRange("A5").getValue();
var fuel4 = sheet.getRange("D5").getValue();
var data4 = sheet.getRange("C5").getValue();
var line4 = nome4 + "\t" + fuel4 + "\t\t" + "Em: " + data4;
var nome5 = sheet.getRange("A6").getValue(); //cBranco
var fuel5 = sheet.getRange("D6").getValue();
var data5 = sheet.getRange("C6").getValue();
var line5 = nome5 + "\t" + fuel5 + "\t\t" + "Em: " + data5;
var nome6 = sheet.getRange("A7").getValue();
var fuel6 = sheet.getRange("D7").getValue();
var data6 = sheet.getRange("C7").getValue();
var line6 = nome6 + "\t" + fuel6 + "\t\t" + "Em: " + data6;
var nome7 = sheet.getRange("A8").getValue();
var fuel7 = sheet.getRange("D8").getValue();
var data7 = sheet.getRange("C8").getValue();
var line7 = nome7 + "\t" + fuel7 + "\t\t" + "Em: " + data7;
var nome8 = sheet.getRange("A9").getValue();
var fuel8 = sheet.getRange("D9").getValue();
var data8 = sheet.getRange("C9").getValue();
var line8 = nome8 + "\t\t" + fuel8 + "\t\t" + "Em: " + data8;
var nome9 = sheet.getRange("A10").getValue();
var fuel9 = sheet.getRange("D10").getValue();
var data9 = sheet.getRange("C10").getValue();
var line9 = nome9 + "\t\t" + fuel9 + "\t" + "Em: " + data9;
var nome10 = sheet.getRange("A11").getValue();
var fuel10 = sheet.getRange("D11").getValue();
var data10 = sheet.getRange("C11").getValue();
var line10 = nome10 + "\t" + fuel10 + "\t\t" + "Em: " + data10;
var nome11 = sheet.getRange("A12").getValue(); //fZezere
var fuel11 = sheet.getRange("D12").getValue();
var data11 = sheet.getRange("C12").getValue();
var line11 = nome11 + "\t" + fuel11 + "\t\t" + "N.A.";
var nome12 = sheet.getRange("A13").getValue();
var fuel12 = sheet.getRange("D13").getValue();
var data12 = sheet.getRange("C13").getValue();
var line12 = nome12 + "\t" + fuel12 + "\t\t" + "Em: " + data12;
var nome13 = sheet.getRange("A14").getValue();
var fuel13 = sheet.getRange("D14").getValue();
var data13 = sheet.getRange("C14").getValue();
var line13 = nome13 + "\t\t" + fuel13 + "\t\t" + "Em: " + data13;
var nome14 = sheet.getRange("A15").getValue();
var fuel14 = sheet.getRange("D15").getValue();
var data14 = sheet.getRange("C15").getValue();
var line14 = nome14 + "\t\t" + fuel14 + "\t\t" + "Em: " + data14;
var nome15 = sheet.getRange("A16").getValue();
var fuel15 = sheet.getRange("D16").getValue();
var data15 = sheet.getRange("C16").getValue();
var line15 = nome15 + "\t" + fuel15 + "\t\t" + "Em: " + data15;
var nome16 = sheet.getRange("A17").getValue(); //ourique
var fuel16 = sheet.getRange("D17").getValue();
var data16 = sheet.getRange("C17").getValue();
var line16 = nome16 + "\t" + fuel16 + "\t\t" + "Em: " + data16;
var nome17 = sheet.getRange("A18").getValue();
var fuel17 = sheet.getRange("D18").getValue();
var data17 = sheet.getRange("C18").getValue();
var line17 = nome17 + "\t" + fuel17 + "\t\t" + "Em: " + data17;
var nome18 = sheet.getRange("A19").getValue();
var fuel18 = sheet.getRange("D19").getValue();
var data18 = sheet.getRange("C19").getValue();
var line18 = nome18 + "\t" + fuel18 + "\t\t" + "Em: " + data18;
var nome19 = sheet.getRange("A20").getValue();
var fuel19 = sheet.getRange("D20").getValue();
var data19 = sheet.getRange("C20").getValue();
var line19 = nome19 + "\t\t" + fuel19 + "\t\t" + "Em: " + data19;
var nome20 = sheet.getRange("A21").getValue();
var fuel20 = sheet.getRange("D21").getValue();
var data20 = sheet.getRange("C21").getValue();
var line20 = nome20 + "\t" + fuel20 + "\t\t" + "Em: " + data20;
var nome21 = sheet.getRange("A22").getValue();
var fuel21 = sheet.getRange("D22").getValue();
var data21 = sheet.getRange("C22").getValue();
var line21 = nome21 + "\t" + fuel21 + "\t\t" + "Em: " + data21;
var nome22 = sheet.getRange("A23").getValue();
var fuel22 = sheet.getRange("D23").getValue();
var data22 = sheet.getRange("C23").getValue();
var line22 = nome22 + "\t\t" + fuel22 + "\t\t" + "Em: " + data22;
var nome23 = sheet.getRange("A24").getValue();
var fuel23 = sheet.getRange("D24").getValue();
var data23 = sheet.getRange("C24").getValue();
var line23 = nome23 + "\t" + fuel23 + "\t\t" + "N.A.";
var nome24 = sheet.getRange("A25").getValue();
var fuel24 = sheet.getRange("D25").getValue();
var data24 = sheet.getRange("C25").getValue();
var line24 = nome24 + "\t" + fuel24 + "\t\t" + "N.A.";
var data = Utilities.formatDate(new Date(), "GMT", "dd-MMM-yyyy")
var msg = ""+line0+"\n"+line1+"\n"+line2+"\n"+line3+"\n"+line4+"\n"+line5+"\n"+line6+"\n"+line7+"\n"+line8+"\n"+line9+"\n"+line10+"\n"+line11+"\n"+line12+"\n"+line13+"\n"+line14+"\n"+line15+"\n"+line16+"\n"+line17+"\n"+line18+"\n"+line19+"\n"+line20+"\n"+line21+"\n"+line22+"\n"+line23+"\n"+line24+" \n \nEMAIL GERADO AUTOMATICAMENTE POR GROUND OPERATIONS"
MailApp.sendEmail("emails#gmail.com", "Fuel "+data+"", msg, {
name: 'Fuel Qty Auto Message'});
}

Resources