Hi all
I have written simple programs that show in DataGridView some info. The most important info is the expiration date , which I manage to color it read when the expiration date is near(like 5 days). The person responsible has an email in the database. I use a SQL database. What is the code to send email only to the persons that their products are near the expiration date? If I call the function send_mail() in the code that colors the line red it sends infinite mails to 1 person. This is my code:

Private Sub dgvExcel_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting

If CDate(DataGridView1.Rows(e.RowIndex).Cells(DataGridView1.Columns(5).Index).Value) <= Date.Now Then
e.CellStyle.BackColor = Color.Red
'send_mail()
End If

If CDate(DataGridView1.Rows(e.RowIndex).Cells(DataGridView1.Columns(4).Index).Value) <= Date.Now Then
e.CellStyle.BackColor = Color.White
e.CellStyle.ForeColor = Color.Black
End If


End Sub