From = "info@legacyusa.net"; $mail->FromName = "info@legacyusa.net"; $mail->Host = "rayclements.com"; $mail->Mailer = "smtp"; include "email.php"; $mail->Body = $body; $mail->Subject = "Legacy Software Downloaded on " . $today[mon] . "/" . $today[mday] . "/" . $today[year]; $mail->AddAddress("legacy@legacyusa.net"); if(!$mail->Send()) { echo "There was an error processing your request. Please try again later."; } $mail->ClearAddresses(); include "emaillink.php"; $mail->Body = $body2; $mail->Subject = "Legacy Software ready for download"; $mail->AddAddress($emailaddress); if(!$mail->Send()) { echo "There was an error processing your request. Please try again later."; } $mail->ClearAddresses(); $key = "unlock"; include "emailing.php"; } else { $errormessage = "Make sure you enter a valid email address."; include "form.html"; } } else { include "form.html"; } } else { include "form.html"; } ?>