I have setup a simple form on my website to test sending email using PHP.

The form posts the input of three text fields to email-form-process.php, which looks like this:

```
<?php

    $email = $_POST['email'];

    $subject = "Test Email Worked";

    $msg = $_POST['comment'];

    mail ('$email','$subject','$msg');

    header('Location: email-form-confirm.php');
    exit();

?>

```

I echoed out the three inputs in a test to make sure email-form-process.php is receiving them from the form, which it is.

The problem I am having is that the email isn't being received at any of my emails. I have tested it going to a @live.com email and to two custom domains hosted by domains.live.com.

I use domains.live.com to host all of my email for my websites. I have my DNS records setup via my host, MediaTemple, for domains.live.com to handle my email. This works really great for regular email stuff, but I'm not sure what the best way is to send email in PHP using my custom domain emails hosted by domains.live.com.

**How do I send email from me@mydomain.com via PHP when my domain is hosted by MediaTemple and my email is hosted by domains.live.com?**

I have not tried using the SMTP method yet. Would the solution found at the following link be a good direction for me to go? <http://www.9lessons.info/2009/10/send-mail-using-smtp-and-php.html>

Thank you in advance for any help you can offer!

-Mark