in reply to send mail

You've shown a lot of things here that are irrelevant.

Produce code for each problem at a time. 1) email, 2) the status piece.

Get rid of all the HTML/CSS etc until these two key items are sorted.

Also, you're gaining less and less credibility by continuing to ask questions here without utilizing the recommendations that have been presented to you in the past: use warnings;, use strict;... where are those for example?