Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 10 of 10

Thread: dynamic email

  1. #1
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    dynamic email

    I would like to send an email variable to my PHP code on my server.

    Here's my PHP:
    <?php
    $to="me@me.com";
    if (isset($_REQUEST['message']))
    {
    //$message = wordwrap($_REQUEST['message'], 70, "<br>\n", TRUE);
    $message =$_REQUEST['message'];
    if (isset($_REQUEST['subject']))
    {
    $subject = $_REQUEST['subject'];
    mail ("$to","$subject","$message","From: Web Rate");
    echo "success";
    }
    else
    echo "no subject";
    }
    else
    {
    echo "no message";
    }
    exit;
    ?>


    And here's my info:
    myvalues = {to=salon_email_result..subject="Web Rate",message=CD_number_result.."\r\nDate Run - "..date_value_result.."\r\nSystem Who - "..who_value_result.."\r\nReal Who - "..real_who_value_result.."\r\nRandom # - "..randomnum_result.."\r\nEmail - "..email_value_result.."\r\nIP - "..ip_value_result.."\r\nMac - "..mac_value_result.."\r\nTime - "..time_result.."\r\nButtons Clicked - \r\n"..result3};

    The area in red is where im having an issue..Help?

  2. #2
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    I'm not sure of what exactly you want to know, is it this?
    The php script:
    PHP Code:
    <?php
    $to
    =$_POST['to'];
    if (isset(
    $_POST['message'])){
        
    //$message = wordwrap($_POST['message'], 70, "<br>\n", TRUE);
        
    $message =$_POST['message'];
        if (isset(
    $_POST['subject'])){
            
    $subject $_POST['subject'];
            
    mail ("$to","$subject","$message","From: Web Rate");
            echo 
    "success";
        }
        else{
            echo 
    "no subject";
        }
        else{
            echo 
    "no message";
        }
    }
    exit;
    ?>
    The AMS script:
    Code:
    myvalues = {to=salon_email_result, subject="Web Rate",message=CD_number_result.."\r\nDate Run - "..date_value_result.."\r\nSystem Who - "..who_value_result.."\r\nReal Who - "..real_who_value_result.."\r\nRandom # - "..randomnum_result.."\r\nEmail - "..email_value_result.."\r\nIP - "..ip_value_result.."\r\nMac - "..mac_value_result.."\r\nTime - "..time_result.."\r\nButtons Clicked - \r\n"..result3};
    HTTP.Submit("http://url.com/myfile.php", myvalues, SUBMITWEB_POST, 20, 80, nil, nil);
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  3. #3
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    Thanks Imagine Programming
    Hummm can't seem to get it to work... Anyone else?

  4. #4
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    Can anyone else confirm that Imagine Programmings PHP code works?
    I get On click, line 73: Attempt to concatenate global "result3" (a nil value)
    Last edited by Bruce; 06-13-2009 at 07:12 PM.

  5. #5
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    result3 is a variable in the end of the myvalues table, you filled it in lol
    it stands for Buttons Clicked? Highlighted in fatred.
    Code:
    myvalues = {to=salon_email_result, subject="Web Rate",message=CD_number_result.."\r\nDate Run - "..date_value_result.."\r\nSystem Who - "..who_value_result.."\r\nReal Who - "..real_who_value_result.."\r\nRandom # - "..randomnum_result.."\r\nEmail - "..email_value_result.."\r\nIP - "..ip_value_result.."\r\nMac - "..mac_value_result.."\r\nTime - "..time_result.."\r\nButtons Clicked - \r\n"..result3};
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  6. #6
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    WHAT A BONE HEAD!!!!! LMAO! I'm doing to many things at one time!

  7. #7
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    The PHP should have looked like this:

    <?php
    $to=$_REQUEST['to'];
    if (isset($_REQUEST['message']))
    {
    //$message = wordwrap($_REQUEST['message'], 70, "<br>\n", TRUE);
    $message =$_REQUEST['message'];
    if (isset($_REQUEST['subject']))
    {
    $subject = $_REQUEST['subject'];
    mail ("$to","$subject","$message","From: Web Rate");
    echo "success";
    }
    else
    echo "no subject";
    }
    else
    {
    echo "no message";
    }
    exit;
    ?>

    Thanks Imagine Programming.

  8. #8
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    np Doesn't $_POST work for you? I never use $_REQUEST alot hehe.
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  9. #9
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    No it sure didn't.

  10. #10
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Weird it does over here, never knew that could differ. Ah well, at least it works, the important thing lol
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

Posting Permissions

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