How do I send email?

0 favourites
  • 6 posts
  • Hi i would like to achive this:

    when the player beat a special boss, a screenshot is taken from the app and then sended to an email, how can i achieve that?

  • You can do it in Java with the javax.mail library. That is how I send emails.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • its not an html5 game its for android devices

  • Hi i would like to achive this:

    when the player beat a special boss, a screenshot is taken from the app and then sended to an email, how can i achieve that?

    You can certainly send an html email with a picture embeded, I dont know about a screenshot from android, but you could send one from pc.

    I have a tutorial to send a basic email here https://www.scirra.com/tutorials/4897/sending-an-email-from-construct2

    To add a picture all you have to do is add an html element inside, the php, example below.

    <?php

    $date=date('l jS \of F Y h:i:s A');

    $msg ="<html>

    <head>

    <style>

    table {

    font-family: arial, sans-serif;

    border-collapse: collapse;

    width: 100%;

    }

    td, th {

    border: 1px solid black;

    border-collapse: collapse;

    padding: 8px;

    }

    th {background-color: DarkKhaki ;

    text-align: center;

    }

    td {background-color: OliveDrab ;}

    td {color: white ;

    text-align: center;}

    </style>

    </head>

    <body>

    <table>

    <th>Picture sent on $date</th>

    </table>

    <img src=\"http://www.yoursever.com/yourpic.png\">

    </body>

    </html>";

    //email information

    $to = 'Whoever.@here.com';

    $subject = "test1";

    $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

    $headers .= 'MIME-Version: 1.0' . "\r\n";

    $headers .= 'From: ' . "\r\n" .

    'Reply-To: whoever.lqn@here.com' . "\r\n" .

    'X-Mailer: PHP/' . phpversion();

    mail($to,$subject,$msg,$headers);

    ?>

    This only uses php mail, and no other plugin or mailer

    This is tested, and works, It might go in your junk mail, and takes a while to be received, good luck.

  • what im trying to achieve is only for mobile devices Android, not for pc

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)