Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: i need tell friend script.

  1. #11
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Outlook is an email client, not an SMTP server. Search google for an SMTP server. I'm not really familiar with vb.net or asp, but you need to make sure that your (live) host has asp.NET installed before you can use the script posted. If you have PHP or any other server side language installed on the live server, you could search hotscripts.com for your specific script.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  2. #12
    Join Date
    Jul 2008
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    thanks alot for your valuable information , i need to search about it .
    thank you again

  3. #13
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    807
    Thanks
    87
    Thanked 2 Times in 2 Posts

    Default

    This is one I have:

    <head>
    Code:
    <script type="text/javascript">
    <!--
    function reset() {
    document.tellafriend.name.value="";
    document.tellafriend.email.value="";
    document.tellafriend.friendmail1.value="";
    document.tellafriend.friendmail2.value="";
    document.tellafriend.friendmail3.value="";
    }
    function validate(form) {
    if (form.name.value.length==0) {
    alert("vul je naam in, aub");
    return false;
    }
    if (form.email.value.length==0) {
    alert("vul je email adres in, aub");
    return false;
    }
    if (form.friendmail1.value.length==0) {
    alert("vul je vriends email adres in, aub");
    return false;
    }
    return true;
    }
    //-->
    </script>
    body tag:
    Code:
    <body onload="reset()">
    form in html:
    Code:
    <form name="tellafriend" action="tellafriend.php" method="post" onsubmit="return validate(this);"> 
    
    <table border="0" cellpadding="10" cellspacing="0">
    <tr><td>
    &#42 je naam:
    </td><td>
    <input size="30" class="input" name="name" style="border:1px solid #666666; width:250px">
    </td></tr>
    <tr><td>
    &#42 je email:
    </td><td>
    <input size="30" class="input" name="email" onFocus="clearDefault(this)" style="border:1px solid #666666; width:250px">
    </td></tr>
    <tr><td>
    &#42 email vriend 1
    </td><td>
    <input size="30" class="input" name="friendmail1" onFocus="clearDefault(this)" style="border:1px solid #666666; width:250px">
    </td></tr>
    <tr><td>
    email vriend 2
    </td><td>
    <input size="30" class="input" name="friendmail2" onFocus="clearDefault(this)" style="border:1px solid #666666; width:250px">
    </td></tr>
    <tr><td>
    email vriend 3
    </td><td>
    <input size="30" class="input" name="friendmail3" onFocus="clearDefault(this)" style="border:1px solid #666666; width:190px"> 
    &nbsp;
    <INPUT TYPE="submit" class="input" NAME="submit" VALUE="zend" onclick="validate();" style="border: 1px solid #666666; background-color:white; height:17px; width:48px;">
    </td></tr></table>
    
    </form>
    tellafriend.php
    Code:
    <?php
    
    if(count($_POST)) {
    
    foreach(array('friendmail1','friendmail2','friendmail3','email','name') as $key) $_POST[$key] = strip_tags($_POST[$key]);
    if(!is_secure($_POST)) { die("Asta la vista Hacker");}
    
    $emailto = "bert@ikke.be"; 
    
    $esubject = "tell a friend is gebruikt"; 
    
    $emailtext = "
    $_POST[name] heeft de tell-a-friend form gebruikt. Zijn email adres is $_POST[email]
    
    De vrienden zijn:
    
    $_POST[friendmail1]
    $_POST[friendmail2]
    $_POST[friendmail3]
    
    ";
    
    @mail("$emailto", $esubject, $emailtext, "From: $_POST[email]");
    
    $thankyoupage = "index.html"; 
    
    $tsubject = "$_POST[name] raadt je hetbestevoordeel.be aan";
    
    $ttext = "
    Hey,
    
    $_POST[name] ( $_POST[email] ) raadt je deze site aan: 
    http://www.hetbestevoordeel.be
    Zeker bezoeken !
    
    ";
    
    @mail("$_POST[friendmail1],$_POST[friendmail2],$_POST[friendmail3]", $tsubject, $ttext, "FROM: $_POST[email]");
    
    header("Location: $thankyoupage");
    exit;
    
    }
    
    function is_secure($ar) {
    $reg = "/(Content-Type|Bcc|MIME-Version|Content-Transfer-Encoding)/i";
    if(!is_array($ar)) { return preg_match($reg,$ar);}
    $incoming = array_values_recursive($ar);
    foreach($incoming as $k=>$v) if(preg_match($reg,$v)) return false;
    return true;
    }
    
    function array_values_recursive($array) {
    $arrayValues = array();
    foreach ($array as $key=>$value) {
    if (is_scalar($value) || is_resource($value)) {
    $arrayValues[] = $value;
    $arrayValues[] = $key;
    }
    elseif (is_array($value)) {
    $arrayValues[] = $key;
    $arrayValues = array_merge($arrayValues, array_values_recursive($value));
    }
    }
    return $arrayValues;
    }
    ?>

Bookmarks

Posting Permissions

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