Results 1 to 6 of 6

mail.php

This is a discussion on mail.php within the Troubleshooting forums, part of the vBSEO SEO Plugin category; I have my forum in the root and a subdomain that has another non vb site. In that subdomains folder, ...

  1. #1
    Member JADM's Avatar
    Real Name
    Jason
    Join Date
    Dec 2007
    Posts
    79
    Liked
    0 times
    Blog Entries
    18

    mail.php

    I have my forum in the root and a subdomain that has another non vb site. In that subdomains folder, I have the following simple send mail .php file:


    <?php
    /* Simple Mail Routine.
    Should send a mail with all the information to the target listed.
    Check the //EDIT lines for things that need to be changed before implementation.
    INPUT objects in FORMS with names including 'hide_' will not be included in the e-mail;
    Everything else shows up in the e-mail in "Formatted Field Name: Value" format.
    Formatted Field Name is basically the name of the field, with underscores replaced by spaces and each word
    uppercase (first).
    */
    $textstring = '';
    $htmlstring = '';
    $emailSender = $_POST['Email_Address'];
    foreach ($_POST as $key => $value){
    if (!stristr($key, 'hide_') && !stristr($key, 'submit')){
    $key = str_replace('_', ' ', $key);
    $key = ucfirst($key);
    $htmlstring .= "<B>{$key}</B> : $value <BR>";
    $textstring .= "$key : $value \n\n";
    }
    }
    if ($_POST){
    $mail_from = isset($_POST['Email_Address']) ? $_POST['Email_Address'] : 'Simple Web Design SF Inquiry Form';
    $sender_name = $emailSender;
    $mail_subject = isset($_POST['hide_subject']) ? $_POST['hide_subject'] : $mailSubject;
    $mail_to = $mailRecipient;
    //EDIT - change the following two 'default' redirect pages.
    $page_redirect = isset($_POST['hide_redirect']) ? $_POST['hide_redirect'] : 'ty.html';
    $page_error = isset($_POST['hide_errorpage']) ? $_POST['hide_errorpage'] : 'error.html';
    $mail_headers = "MIME-Version: 1.0\nContent-Type: text/html;charset=iso-8859-1\nFrom: $sender_name\n";
    //EDIT - change this from $htmlstring to $textstring for text-formatted email.
    if (mail($mail_to, $mail_subject, $htmlstring, $mail_headers)){
    echo "<META HTTP-EQUIV='Refresh' CONTENT='0; URL=$page_redirect'>";
    } else {
    header("Location: {$page_error}");
    }
    }
    ?>
    The URL is Jason Perry LLC

    It doesn't work anymore, I am not sure if it has not been working since vBSEO install or is unrelated. My question is, does anyone know why vBSEO might cause this to not work?

    Thanks in advance.

  2. #2
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hello,

    try to create .htaccess in that folder:
    Code:
    RewriteEngine off
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #3
    Member JADM's Avatar
    Real Name
    Jason
    Join Date
    Dec 2007
    Posts
    79
    Liked
    0 times
    Blog Entries
    18

    .htaccess is there

    It's already there....does it need to be CHMODed to something?

    Thanks!

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    What is the contents of that .htaccess? (with the line mentioned above)
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  5. #5
    Member JADM's Avatar
    Real Name
    Jason
    Join Date
    Dec 2007
    Posts
    79
    Liked
    0 times
    Blog Entries
    18
    Nothing else, just that line.

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    That is most likely not related to vBSEO then, please try to temporarily disable vBSEO and check if the script works.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


Similar Threads

  1. Spammed mail
    By vnjporg in forum Troubleshooting
    Replies: 2
    Last Post: 05-30-2007, 12:01 AM
  2. VBSEO & E-Mail
    By Exitilus in forum General Discussion
    Replies: 6
    Last Post: 01-25-2007, 07:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •