how can i fix my mail function error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simon2x1
    New Member
    • Dec 2008
    • 123

    how can i fix my mail function error

    the code below is a code given to me to solve the problem of my mail going in to spam but i have a problem with line 16 how can i fix it and what should i do i will appreciate if u will edit the problem on the code below

    Code:
    <?php
       include("Mail.php");
      /* mail setup recipients, subject etc */
      $recipients = "feedback@yourdot.com";
      $headers["From"] = "user@somewhere.com";
      $headers["To"] = "feedback@yourdot.com";
      $headers["Subject"] = "User feedback";
      $mailmsg = "Hello, This is a test.";
       /* SMTP server name, port, user/passwd */
      $smtpinfo["host"] = "smtp.mycorp.com";
      $smtpinfo["port"] = "25";
      $smtpinfo["auth"] = true;
      $smtpinfo["username"] = "smtpusername";
      $smtpinfo["password"] = "smtpPassword";
      /* Create the mail object using the Mail::factory method */
      $mail_object =& Mail::factory("smtp", $smtpinfo);
       /* Ok send mail */
     $mail_object->send($recipients, $headers, $mailmsg);
    ?>
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    you’re using PHP4? other than that there is no way we can help you, because we don’t know what the error is or what the Mail class does.

    Comment

    Working...