Question: Trying to send an e-mail via SMTP, its not working, any help?

```
//SMTP info
$host = "smtp.gmail.com";
$username = "taylor.mitchellstjoseph@googlemail.com";
$password = "password";
$from = "Taylor";//From email address
$to = "taylor@t-webdesign.co.uk";//Change this to your inbox

$headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject);
// HTML email
//$headers .= "MIME-Version: 1.0" . "\r\n";
//$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

$smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password));

//Send to you
$mail = $smtp->send($to, $headers, $message);
if (PEAR::isError($mail)) {
    echo("<h1>** Whoops! Error!. **</h1> <p>Please call us instead.</p>");
    echo("<p>" . $mail->getMessage() . "</p>");
} else {
    echo("<h1>Thank you for your inquiry!</h1> <p>Thank you for signing up for our event. Your request for our guestlist has been received. Please check your email for the confirmation.</p> ");
}

```

Answer: 
Please check your PHP logs and see if there are any errors reported. The syntax looks right.
Note that many ISPs require you to use their own SMTP server and block other ones.