A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Linking my site to my gmail account

  1. #1
    Junior Member
    Join Date
    Dec 2008

    Linking my site to my gmail account

    I have almost finished a flash site for a client. They have a gmail account and i want to link it to the gmail account. However, I think that having a contact email on the site that says 'info@nameofthesite.com' looks way better than nameofhtesite@gmail.com and I would rather link the site to the gmail account than have it on the site needing copying and pasting.
    I figure its something small and easy enough.
    Any help would be GREATLY appreciated.
    Also... does anyone know of a gooe AS3 contact form tutorial?

  2. #2
    Senior Member
    Join Date
    Oct 2008
    Im not sure about AS3, but this is how it's done in AS2:
    ps. Flash cannot do this alone, so you need a server that supports PHP.
    submit.onRelease = function(){
    var email_lv:LoadVars = new LoadVars();
    var email_reciever:LoadVars = new LoadVars();
    email_lv.eName = input_name.text; //The input field for name
    email_lv.eMail = input_email.text; //The input field for email (The user's email that is)
    email_lv.eSubject = input_subject.text; //The input field for subject
    email_lv.eMessage = input_message.text; //The input field for message
    email_reciever.onLoad = function(success:Boolean){
    statusField.text = "The email was sent!";
    } else {
    statusField.text = "The email was NOT sent!";
    And your 'sender.php' file:

    PHP Code:
    $name = $_POST["eName"];
    $email = $_POST["eMail"];
    $subject = $_POST["eSubject"];
    $message = $_POST["eMessage"];
    mail("nameofthesite@gmail.com", $subject, $message, "From: $name <$email>");
    Last edited by Vexy; 08-19-2009 at 05:24 PM.

Tags for this Thread

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