dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Email problem

  1. #1
    Member
    Join Date
    May 2005
    Location
    England
    Posts
    44

    Email problem

    Hi i have a lfash file which acts as a feedback form. I can do this normally in html but this flash i am having trouble.

    I have my php file with

    PHP Code:
    <?php

    $to
    ="website"
    $namenew $GET['name']
    $emailnew $GET['email'];
    $feedbacknew $_GET['message']
    $subject "Feed back form"." "."$emailnew";

    $matter "Contact form from contact page" "\n\n" .
          
    "Name: " "$namenew"."\n\n" .
          
    "Email: " "$feedbacknew"."\n\n".
          
    "Message: " .  "$feedbacknew""\n\n"    

    mail("$to","$subject","$matter","From: $emailnew");
    ?> I the same directroy on my website as the flash file
    and my code for sending the mail is

    Code:
    loadVariablesNum("mailScript.php"   +   "?name=" + nam_txt.text   +   "&email=" + eml_txt.text   +   "&subject=" + sub_txt.text   +   "&message=" + msg_txt.text,0);
    So why do i not get an emial @ my site?

    Thx
    Last edited by thomas49th; 08-28-2006 at 02:17 PM.
    And when a man gets to heaven;
    To saint paul he'll tell:
    1 more solider reporting sir,
    I've served my time on hell

    June 6th 1944

  2. #2
    Member
    Join Date
    May 2005
    Location
    England
    Posts
    44
    Going to try


    on(press) {
    var send_lv:LoadVars = new LoadVars();

    if (sub_txt.text != "" ) {
    send_lv.subject = sub_txt.text

    if (nam_txt.text != "") {
    sned_lv.name = nam_txt.text;

    if (msg_txt.text != "") {

    send_lv.email = eml_txt.text;
    send_lv.message = msg_txt.text;
    send_lv.sendAndLoad("mailScript.php", send_lv,"GET");
    gotoAndStop(2);

    }

    }

    }

    }

    but my mail protocol is having probs @ da moment

    Will you think this will work?

    Thx
    And when a man gets to heaven;
    To saint paul he'll tell:
    1 more solider reporting sir,
    I've served my time on hell

    June 6th 1944

  3. #3
    Member
    Join Date
    May 2005
    Location
    England
    Posts
    44
    SMTP working again....

    ...but my feedback page isn't working:

    PHP Code:
    <?php

    $to
    ="site"
    $namenew $_REQUEST['name']
    $emailnew $_REQUEST['email'];
    $feedbacknew $_REQUEST['message']
    $subject "Feed back form"." "."$emailnew";

    $matter "Contact form from contact page" "\n\n" .
          
    "Name: " "$namenew"."\n\n" .
          
    "Email: " "$email"."\n\n".
          
    "Message: " .  "$feedbacknew""\n\n"    

    mail("$to","$subject","$matter","From: $emailnew");

    ?>

    on(press) {
    var send_lv:LoadVars = new LoadVars();

    if (sub_txt.text != "" ) {
    send_lv.subject = sub_txt.text

    if (nam_txt.text != "") {
    sned_lv.name = nam_txt.text;

    if (msg_txt.text != "") {

    send_lv.email = eml_txt.text;
    send_lv.message = msg_txt.text;
    send_lv.sendAndLoad("mailScript.php", send_lv,"POST");
    gotoAndStop(2);

    }

    }

    }

    }

    I upload to my site run it and i get no mail
    Last edited by thomas49th; 08-28-2006 at 02:15 PM.
    And when a man gets to heaven;
    To saint paul he'll tell:
    1 more solider reporting sir,
    I've served my time on hell

    June 6th 1944

  4. #4
    Member
    Join Date
    May 2005
    Location
    England
    Posts
    44
    Ahh ,y php script was wrong so i edited it and ive tested in the internet explorer bar.

    PHP Code:
    <?

    $namenew 
    $_REQUEST['name'];
    $emailnew $_REQUEST['email'];
    $feedbacknew $_REQUEST['message'];
    $subject "Feed back form"." "."$emailnew";

    $matter "Contact form from contact page" "\n\n" .
          
    "Name: " "$namenew"."\n\n" .
          
    "Email: " "$email"."\n\n".
          
    "Message: " .  "$feedbacknew""\n\n";

    mail("support@website.co.uk","$subject","$matter","From: $emailnew");

    ?>
    Last edited by thomas49th; 08-28-2006 at 02:12 PM.
    And when a man gets to heaven;
    To saint paul he'll tell:
    1 more solider reporting sir,
    I've served my time on hell

    June 6th 1944

  5. #5
    Member
    Join Date
    May 2005
    Location
    England
    Posts
    44
    Ahh got it

    loadVariablesNum("mailScript.php" + "?name=" + nam_txt.text + "&email=" + eml_txt.text + "&message=" + msg_txt.text,0,"POST");
    Last edited by thomas49th; 08-28-2006 at 02:11 PM.
    And when a man gets to heaven;
    To saint paul he'll tell:
    1 more solider reporting sir,
    I've served my time on hell

    June 6th 1944

  6. #6
    Member
    Join Date
    May 2005
    Location
    England
    Posts
    44
    Ahh! It dosn't work hen i upload it to my site!!! I dosn't send my an emial at all, when i run it from my pc locally it works (note: even on locally it uses the script @ my site")

    Why is it doing this. I uploaded my swf fiole which works fine (tested it on local hd) uptp my site via ftp then ran it and it didn't work.

    loadVariablesNum("mailScript.php" + "?name=" + nam_txt.text + "&email=" + eml_txt.text + "&message=" + msg_txt.text,0,"POST");


    and i get an email straight away. So why isn't it working in flash on my website when it works fine on my local hd

    Thx
    Last edited by thomas49th; 08-28-2006 at 02:11 PM.
    And when a man gets to heaven;
    To saint paul he'll tell:
    1 more solider reporting sir,
    I've served my time on hell

    June 6th 1944

  7. #7
    Member
    Join Date
    May 2005
    Location
    England
    Posts
    44
    I did another quick test with a different file. I did
    loadVariablesNum("mailScript.php" + "?name=Tomasd&subject=Non&message=hello this is a test123",0,"POST");

    but it didn't work at all when i ran it from the website but it worked fine when i ran it from my Hard drive
    Last edited by thomas49th; 08-28-2006 at 02:10 PM.
    And when a man gets to heaven;
    To saint paul he'll tell:
    1 more solider reporting sir,
    I've served my time on hell

    June 6th 1944

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center