If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Aug 2016
    Member #

    Contact form problems


    I bought a really nice template and can't seem to get the form working. If you fill out the form check out the message it gives. EXPERT DESIGN, WEBSITE DESIGNERS STRONGSVILLE, OHIO 44136

    It directs to a .php and it has comments but I don't like all that and doesn't work on my system and want to make it work so I need different code, I know it should be easier than all the stuff in the comments, here's the code:

    PHP Code:
    // PHP extensions Mail and Net_SMTP must be installed. If they are not already
    // installed, install them by PEAR:
    // > pear install Mail
    // > pear install Net_SMTP
    // SSL must be allowed. On Windows you should uncomment line in php.ini:
    //        extension=php_openssl.dll
    // If you use as smpt host then use:
    //        [url][/url]
    // and allow access for less secure apps:
    //        [url][/url]
    // =============================================================================
    // NOTES
    // contact.php — is a script for a web servers with php support.
    // Extensions which required for this script are often installed by default.
    // If they are not already installed, the easiest way to do this using PEAR.
    // Learn more about PEAR [url=]PEAR - PHP Extension and Application Repository[/url].
    // Editing the php.ini required only on Windows. On other operating systems this
    // is usually not required. Location of this file depends on settings of web
    // server.
    // Also, your web server should not be denied access to external mail servers.
    // On the majority of paid and on many free hostings (eg OpenShift:
    // [url][/url]) all these features are available. 
    // =============================================================================

    require_once "Mail.php";
    // Change this options:
    $username '';
    $password 'password';
    $smtpHost 'ssl://';
    $smtpPort '465';
    $to '';
    $from '';

    $subject 'Contact Form';
    $successMessage 'Message successfully sent!';

    $replyTo $_POST['your-email'];
    $name $_POST['your-name'];
    $body $_POST['your-message'];

    $headers = array(
    'From' => $name " <" $from ">",
    'Reply-To' => $name " <" $replyTo ">",
    'To' => $to,
    'Subject' => $subject
    $smtp Mail::factory('smtp', array(
    'host' => $smtpHost,
    'port' => $smtpPort,
    'auth' => true,
    'username' => $username,
    'password' => $password

    $mail $smtp->send($to$headers$body);

    if (
    PEAR::isError($mail)) {
    } else {
    Last edited by Ronald Roe; Aug 04th, 2016 at 07:04 PM.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 12:25 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: