Please enter an email address << back"; } $select_two = "select email,user,password from firsttable where email='$email'"; $query_two = mysql_query($select_two); $row_two = mysql_fetch_array($query_two); $emailfound = $row_two["email"]; $username = $row_two["user"]; $password = $row_two["password"]; if(($row_two) && ($email)){ require_once 'lib/swift_required.php'; $htmlbody = '
MATCHFINDER AUSTRALIA Forgot Password Email dots

Home | Contact Us |

Username and password

Your username and password are below.

Username: ' . $username . '
Password:'. $password . '

Click Here

Please use the button to the right to go to the home page and log in.

The log in form is in the top right of the home page.

Thank you

The matchfinder team.
http://www.matchfinder.com.au

© matchfinder ™
Matchfinder
You have received this email because you are subscribed to MATCHFINDER as ' . $email . '
'; // Create the mail transport configuration $transport = Swift_MailTransport::newInstance(); // Create the message $message = Swift_Message::newInstance(); $message->setTo(array("". $emailfound ."" => "". $username ."")); $message->setSubject("Matchfinder Forgot Password"); $message->setBody($htmlbody, 'text/html'); $message->setFrom("contact@matchfinder.com.au", "Support"); // Add alternative parts with addPart() $message->addPart('My amazing body in plain text', 'text/plain'); // Send the email $mailer = Swift_Mailer::newInstance($transport); $mailer->send($message); print"Thank you your details have been sent to the email address listed in your profile. Please check your email $email"; } if((!$row_two) && ($email)){ print"Sorry it appears we are unable to find that email address in our system please go back and try again."; } } ?>