if($smtp->response_code==235){ print("Accepted!\n"); } else{ printf("Auth failed\n"); }