For your comment on your question, the $objeto->status
value has a space at the end ("Active"). So, you are comparing the string "Active" with the string "Active" and so it is getting false as a result of the expression.
To resolve this problem you can use the trim () function to remove this space when doing Comparation. Try changing this line:
if ($objeto->$mail == false and "Ativo" == $objeto->status ) {
by this:
if ($objeto->$mail == false and "Ativo" == trim($objeto->status)) {
Tip: Also use the strtolower () to convert the strings to lowercase before comparing. This will avoid problems when comparing "Active" with "active", for example. Here's how:
// remove espaços e converte $objeto->status para minúsculo antes de comparar
if ($objeto->$mail == false and "ativo" == strtolower(trim($objeto->status))) {