User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: How to sent email.

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to sent email.

    Is there any way to sent email from iOS device? The best would be automatic hidden after user agrees on such setting in application settings.

  2. #2
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    You could use Get object and a simple php Script

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm total noob with PHP so I don't have a clue how to send information from MMF to the PHP file at all :<

  4. #4
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I'm a php noob too but it isnt as hard as it sounds. take this example php file:

    <?php
    $sender = $_REQUEST['from_email'];
    $recipient = "your@email.com";
    $name = $_REQUEST['from_name'];
    $somemoreinfo = $_REQUEST['somemoreinfo'];



    $regard = "You've got mail from $name on ".date("d-m-Y");
    $mailtext = "$name This shows the name, now we wanna set some break:\n\nWe got some more info from the app: $somemoreinfo.";
    mail($recipient, $regard, $mailtext, "From: $sender ");
    ?>

    now all you have to do is upload on your server, and send the needed information via GET OBJECT (Post "sender", "name" and "somemoreinfo")

    hope that helps!

  5. #5
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fanotherpg View Post
    I'm total noob with PHP so I don't have a clue how to send information from MMF to the PHP file at all :<

    Using the GET extension, you just make a condition which will trigger the event get Url and then for this Url value, you put in the URL or the php script that you are using with any added post data to the end...

    Condition example
    Start of frame
    Get URL > "http://www.websitename.com/scriptname.php" + "?recipient=" + Edittext$( "Recipient" ) + "?subject=" + Edittext$( "Subject" ) + "?message=" + Edittext$( "Message" )

    If counter=0 + On Get Complete
    Set variable to Recieved content.
    Set counter to 1.

    If variable obtained = "all good"
    Get URL > "http://www.websitename.com/scriptname.php" + "?recipient=" + Edittext$( "Recipient" ) + "?subject=" + Edittext$( "Subject" ) + "?message=" + Edittext$( "Message" )

    If counter=1 + On Get Complete
    Set variable to Recieved content.
    Display variable in some form of string if you want the user to see that they are connected.
    Set counter to 0.

    Which would go to a script like this...
    Code:
    <?php
    
    if ($_GET["status check"])
    {
        echo "all good";
        exit;
    }
    
     $to = $_GET["recipient"];
     $subject = $_GET["subject"];
     $body = $_GET["message"]; 
    
     if (mail($to, $subject, $body)) 
     {
         echo("Message successfully sent!");
     }  
    
     else 
     {
          echo("Message delivery failed...");
     }
     ?>
    Obviously, you can add more php to validate the email address. Anything "echoed" such as "Message successfully sent!" can be retrieved from the MMF2 application using the "On get complete" condition for the GET object. You just need to make sure the values within the square brackets are exactly the same as the parameters set in the URL of the Get URL event.



    I see StringRay jumped in there and answered first so I just added a little part on which checks that the user has a connection, just in case you want that added in to your game.

  6. #6
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    this is great, woodyboy! Because i'm a php noob too, i havent known that it's possible to test the connection! thanks for this!

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot. I will check it in Some spare time but is it possible to send also receiver email address and not only the sender?

  8. #8
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Condition example
    Start of frame
    Get URL > "http://www.websitename.com/scriptname.php" + "?status check=1"

    If counter=0 + On Get Complete
    Set variable to Recieved content.
    Set counter to 1.

    If variable obtained = "all good"
    Get URL > "http://www.websitename.com/scriptname.php" + "?recipient=" + Edittext$( "Recipient" ) + "?subject=" + Edittext$( "Subject" ) + "?message=" + Edittext$( "Message" )

    If counter=1 + On Get Complete
    Set variable to Recieved content.
    Display variable in some form of string if you want the user to see that they are connected.
    Set counter to 0.
    I made a mistake there. You probably found it but just incase, for the first query, the GET URL should only have "status check" as post data. The correction is bolded above.

    Thanks a lot. I will check it in Some spare time but is it possible to send also receiver email address and not only the sender?
    I don't quite understand what you mean here. If you are asking if it's possible for the user to receive emails on the device, then I don't think that's possible.

    However, if you have an SQL database, you could set up your own nifty little communications network with PHP and take emails fully out of the equation. I haven't seen that been done much before.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My friend asked me todo or him a small writing tool according to his specifications and one of the functionality would be a standard sent to email (like from Notes so is it possible to run different appliations within MMF?) but we thought it would be great to sent it automatically as a backup. So user provides email in application settings and on that email stuff is sent. Anyway with such code who would appear as a sender and who as receiver?

  10. #10
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    btw an extension for sending emails with attachement in background is on the way...

Page 1 of 2 1 2 LastLast

Similar Threads

  1. email from the app?
    By payopepe in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 11th September 2012, 01:45 PM
  2. Email object - need help
    By EasySite in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 30th March 2011, 07:17 PM
  3. Email
    By izac in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 4th April 2008, 04:00 PM
  4. Email Object>?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th December 2007, 01:47 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
  •