PHP Email - Not Being Sent

Discussion in 'Email' started by Soccerguy951, Sep 11, 2015.

  1. Like others, I put in the test email code, but i'm also having the issue of my email not being sent.

    What is the mail.php file that is required. I've seen others ask this on the forum, but no response was given.

    I'm using the test code, just updated with my information (my info is not posted.).

    Can someone help with this?


    require_once "Mail.php";
    $from = "Sender <>";
    $to = "Recipient <>";
    $subject = "This is a test email sent via php";
    $body = "This is a test email";
    $host = "";
    $username = "";
    $password = "email_password";
    $headers = array ('From' => $from,
    'To' => $to,
    'Subject' => $subject);
    $smtp = Mail::factory('smtp',
    array ('host' => $host,
    'auth' => true,
    'username' => $username,
    'password' => $password));
    $mail = $smtp->send($to, $headers, $body);

  2. At first i was getting errors, because i didn't have my email password. Once i put i the correct password, i stopped getting the errors, but no email was sent.

Share This Page