changed to using sendmail