Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

PHP not sending email using Website X5 evelution 9 on Godaddy


  • Please log in to reply
No replies to this topic

#1 noah_swett

noah_swett

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:11:34 AM

Posted 20 April 2017 - 09:48 PM

I've been trying to figure out why everthing seems to work perfectly, but no emails are ever sent.

I contacted Godaddy, they checked everthing on there end, and even sent an email from my site that i was able to receive. Right now im just working on a basic contact form, but have a much larger project in the making, and would like my web builder to handle the small form first.

Here is the Code from the html/Form side:

<form id="imObjectForm_8" action="mail/imEmailForm.php" method="post" enctype="multipart/form-data" style="width: 505px; margin: 0; padding: 0; text-align: left;">
                        <fieldset class="first">
                            <div>
                                <div style="float: left; margin: 0; padding: 0 0 2px;"><label for="imObjectForm_8_1" style="vertical-align: top; display: inline-block; margin: 3px 0 2px; width: 246px;">Name*</label><br /><input type="text" class="mandatory" style="float: left; width: 220px; margin-right: 2px; vertical-align: top; padding-top: 2px; padding-bottom: 2px;" id="imObjectForm_8_1" name="imObjectForm_8_1" /><img id="imObjectForm_8_1_tip" src="res/info.gif" title="" onmouseover="x5engine.imTip.Show(this, { text: 'Enter your name here.', position: 'top' })" alt="Tip" style="vertical-align: top; margin-top: 5px;" /></div>
                                <div style="float: left; margin: 0; padding: 0 0 2px;"><label for="imObjectForm_8_2" style="vertical-align: top; display: inline-block; margin: 3px 0 2px; width: 246px;">Email*</label><br /><input type="text" class="mandatory valEmail" style="float: left; width: 220px; margin-right: 2px; vertical-align: top; padding-top: 2px; padding-bottom: 2px;" id="imObjectForm_8_2" name="imObjectForm_8_2" /><img id="imObjectForm_8_2_tip" src="res/info.gif" title="" onmouseover="x5engine.imTip.Show(this, { text: 'Enter your email address here.', position: 'top' })" alt="Tip" style="vertical-align: top; margin-top: 5px;" /></div>
                    <div class="imClear" style="height: 1px; line-height: 1px; width: 505px;"></div>
                                <div style="float: left; margin: 0; padding: 0 0 2px;"><label for="imObjectForm_8_3" style="vertical-align: top; display: inline-block; margin: 3px 0 2px; width: 246px;">Reason for contact*</label><br /><select class="mandatory" style="float: left; width: 220px; margin-right: 2px; vertical-align: top; padding-top: 2px; padding-bottom: 2px;" id="imObjectForm_8_3" name="imObjectForm_8_3"><option value="">-</option><option value="Questions">Questions</option><option value="Comments">Comments</option><option value="Suggestions">Suggestions</option><option value="Requests">Requests</option><option value="Other">Other</option></select><img id="imObjectForm_8_3_tip" src="res/info.gif" title="" onmouseover="x5engine.imTip.Show(this, { text: 'Select the reason you are contacting us.', position: 'top' })" alt="Tip" style="vertical-align: top; margin-top: 5px;" /></div>
                                <div style="float: left; margin: 0; padding: 0 0 2px;"><label for="imObjectForm_8_4" style="vertical-align: top; display: inline-block; margin: 3px 0 2px; width: 246px;">Phone #</label><br /><input type="text" class="" style="float: left; width: 220px; margin-right: 2px; vertical-align: top; padding-top: 2px; padding-bottom: 2px;" id="imObjectForm_8_4" name="imObjectForm_8_4" /><img id="imObjectForm_8_4_tip" src="res/info.gif" title="" onmouseover="x5engine.imTip.Show(this, { text: 'Phone # is optinal, but suggested if requesting we contact your back.', position: 'top' })" alt="Tip" style="vertical-align: top; margin-top: 5px;" /></div>
                    <div class="imClear" style="height: 1px; line-height: 1px; width: 505px;"></div>
                                <div style="float: left; margin: 0; padding: 0 0 2px;"><label for="imObjectForm_8_5" style="vertical-align: top; display: inline-block; margin: 3px 0 2px; width: 499px;">Message*</label><br /><textarea class="mandatory" style="float: left; width: 473px; margin-right: 2px; vertical-align: top; padding-top: 2px; padding-bottom: 2px; padding-left: 0; padding-right: 0; height: 130px;" id="imObjectForm_8_5" name="imObjectForm_8_5"></textarea><img id="imObjectForm_8_5_tip" src="res/info.gif" title="" onmouseover="x5engine.imTip.Show(this, { text: 'Enter your message here.', position: 'top' })" alt="Tip" style="vertical-align: top; margin-top: 5px;" /></div>
                            </div>
                        </fieldset>
                        <fieldset>
                            <input type="hidden" id="imObjectForm_8_prot" name="imSpProt" />
                        </fieldset>
                        <div style="width: 505px; text-align: center;">
                            <input type="submit" value="Send" />
                            <input type="reset" value="Reset" />
                        </div>
                    </form>

Here is the PHP file:

<?php
$settings['imEmailForm_19_8'] = array(
    "owner_email_from" => "Email",
    "owner_email_to" => "noah_swett@yahoo.com",
    "customer_email_from" => "noah_swett@yahoo.com",
    "customer_email_to" => "",
    "owner_message" => "New email from the website. message:",
    "customer_message" => "",
    "owner_subject" => "New Message",
    "customer_subject" => "",
    "owner_csv" => False,
    "customer_csv" => False,
    "confirmation_page" => "../confirmation.html"
);

if(substr(basename($_SERVER['PHP_SELF']), 0, 11) == "imEmailForm") {
    include "../res/x5engine.php";

    $answers = array(
    );

    $form_data = array(
        array('label' => 'Name', 'value' => $_POST['imObjectForm_8_1']),
        array('label' => 'Email', 'value' => $_POST['imObjectForm_8_2']),
        array('label' => 'Select', 'value' => $_POST['imObjectForm_8_3']),
        array('label' => 'Your Message', 'value' => $_POST['imObjectForm_8_4'])
    );

    $files_data = array(
    );

    if(@$_POST['action'] != "check_answer") {
        if(!isset($_POST['imJsCheck']) || $_POST['imJsCheck'] != "jsactive")
            die(imPrintJsError());
        if (isset($_POST['imCpt']) && !isset($_POST['imCptHdn']))
            die(imPrintJsError());
        if(isset($_POST['imSpProt']) && $_POST['imSpProt'] != "")
            die(imPrintJsError());
        $email = new imSendEmail();
        $email->sendFormEmail($settings['imEmailForm_19_8'], $form_data, $files_data);
        @header('Location: ' . $settings['imEmailForm_19_8']['confirmation_page']);
    } else {
        if(@$_POST['id'] == "" || @$_POST['answer'] == "" || strtolower(trim($answers[@$_POST['id']])) != strtolower(trim(@$_POST['answer'])))
            echo "0";
        else
            echo "1";
    }
}

Please help. 



BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users