+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: secret forward

  1. #1
    bunglebrown is offline x10 Sophmore bunglebrown is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    157

    Question secret forward

    I have a section where users can send a link to a friend but I don't know how to forward that info onto myself so that they cannot see it (using BCC I believe). This is part of what I have (below) but of course it doesn't do what I want. Can someone feed me the missing link or advise me on what I'm doing wrong.

    PHP Code:
     $to "$toEmail";
     
    $bcc myemail@hostage.com
        
    mail
    ($to$subject$message$headers$bcc); 

  2. #2
    VPmase's Avatar
    VPmase is offline x10 Elder VPmase is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    Dixon, IL, USA
    Posts
    914

    Re: secret forward

    Use
    PHP Code:
    $to $toEmail ", myemail@hostage.com"
    More info: http://us2.php.net/manual/en/function.mail.php
    Last edited by VPmase; 09-14-2008 at 03:31 PM.

  3. #3
    bunglebrown is offline x10 Sophmore bunglebrown is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    157

    Re: separate greetings

    Well I've resolved that issue - I am now onto something else. . .

    I have a name field whereby users enter the name of the friend they wish to refer and they are greeted with - " Hi $toName, blah blah...". However if the user enters multiple email addresses (separating them with commas) to refer more than one person they are all greeted with the same name. The user cannot simply separate the name with a comma. Does anyone have any suggestions as to how they can each be greeted with their individual names? in thanks

  4. #4
    VPmase's Avatar
    VPmase is offline x10 Elder VPmase is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    Dixon, IL, USA
    Posts
    914

    Re: separate greetings

    Use arrays.

    If you list what the vars are I could show you what I mean.

  5. #5
    bunglebrown is offline x10 Sophmore bunglebrown is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    157

    Re: secret forward

    I think you understand what I mean with the names so -here's the code:

    PHP Code:
    <?php
     
    // Create local PHP variables from the info the user gave in the Flash form -disabled message field
    $toName   $_POST['toName'];
    $toEmail   $_POST['toEmail'];
    $fromEmail $_POST['fromEmail'];
     
    // Strip slashes on the Local variables -disabled message field
    $toName   stripslashes($toName);
    $toEmail      stripslashes($toEmail);
    $fromEmail   stripslashes($fromEmail);
     
        
    $to $toEmail;
        
    $from $fromEmail;
        
    $subject "title";
        
    //Begin HTML Email Message
        
    $message = <<<EOF
    <html>
      <body bgcolor="#FFFFFF">
    <b>Hi 
    $toName,<br />
    <b>            check this out !! <br />
    <b>      <a href="http://website.com</a><br />
    <b>            <br />
      </body>
    </html>
    EOF;
       
    //end of message
        
    $headers  "From: $from\r\n";
        
    $headers .= "Content-type: text/html\r\n";
        
    $headers .= "Bcc: myaddress@host.com";
        
    $to "$to";
     
        
    mail($to$subject$message$headers);
       
    exit();
    ?>

  6. #6
    VPmase's Avatar
    VPmase is offline x10 Elder VPmase is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    Dixon, IL, USA
    Posts
    914

    Re: secret forward

    Ok well I can modify your script to have it put only 1 name per email message but that would require having separate mail() statements for each person.

  7. #7
    bunglebrown is offline x10 Sophmore bunglebrown is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    157

    Re: secret forward

    Can we do that because I've messed about with that a little and it didn't seem to like it, e.g. even putting two identical doesn't work:

    PHP Code:
        mail($to$subject$message$headers);
        
    mail($to$subject$message$headers); 
    how do you suggest we do it?

  8. #8
    Nathan H is offline x10 Elder Nathan H is an unknown quantity at this point
    Join Date
    Apr 2006
    Posts
    562

    Re: secret forward

    Have you tried adding wait/sleep commands in between the mail commands, anti-spam scripts would block a script that tries to mail near perfect copies to serveral emails at once.
    Nathan H Formerly UnFoundBug



    http://www.theadmin.co.uk - Yes i know the colours don't go, I'm working on it.

    VPS Admin | x10-commandments

    So thats where it went! I thought i was losing my mind.

  9. #9
    bunglebrown is offline x10 Sophmore bunglebrown is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    157

    Re: secret forward

    wait/sleep commands - how do I do that? will it do the job?

  10. #10
    Nathan H is offline x10 Elder Nathan H is an unknown quantity at this point
    Join Date
    Apr 2006
    Posts
    562

    Re: secret forward

    in php use
    sleep($int);
    where $int is the time you want to wait in seconds, try using 1 here
    Nathan H Formerly UnFoundBug



    http://www.theadmin.co.uk - Yes i know the colours don't go, I'm working on it.

    VPS Admin | x10-commandments

    So thats where it went! I thought i was losing my mind.

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Port Forward help :3
    By Shadow121 in forum Computers & Technology
    Replies: 18
    Last Post: 06-18-2008, 08:57 PM
  2. Looking Forward
    By kewpie in forum Introductions
    Replies: 3
    Last Post: 05-19-2008, 12:49 AM
  3. A important question about secret trackers
    By iacobos25 in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 05-15-2008, 03:56 PM
  4. Forward Email
    By ICTQuiz in forum Free Hosting
    Replies: 3
    Last Post: 02-09-2008, 06:03 AM
  5. Which upcoming game are you most looking forward too?
    By Agenator in forum Gamer's Lounge
    Replies: 35
    Last Post: 11-17-2007, 03:30 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
x10hosting free hosting for the masses
dedicated servers