Skip to main content
Known Participant
May 7, 2022
Question

HTML in and email from AS3

  • May 7, 2022
  • 2 replies
  • 504 views

Is thee a way to create an html email from AS3 for an AIR SDK application? I would like to generate an advertising like email from code using a mailto or like. 

    This topic has been closed for replies.

    2 replies

    Community Expert
    May 12, 2022

    try this. 

     

    var vEmail:URLRequest = new URLRequest(" mailto:mailexample.com?subject="+yoursubjecttextfield.text+"&body="+yourmessagetextfield.text );bEmail.addEventListener(MouseEvent.CLICK,fEmailClick);function fEmailClick(event:MouseEvent):void {navigateToURL(vEmail," _blank" ) ;}

    kglad
    Community Expert
    Community Expert
    May 12, 2022

    that doesn't advance this thread.

    kglad
    Community Expert
    Community Expert
    May 7, 2022

    you can use the client's default email program with

     

    var request:URLRequest = new URLRequest("mailto:name@mail.com"+"?subject=Subject"+"&body= Hello world ");

    request.method = URLRequestMethod.POST;

    navigateToURL(request, "_blank");

     

    Known Participant
    May 7, 2022

    Thank you for answering, Yes, but you can only populate the body area with plain text. I would like to ad images etc. 

    Is there a way to add images?

    kglad
    Community Expert
    Community Expert
    May 7, 2022

    no.  see your other post about this.