Skip to main content
Known Participant
May 7, 2022 12:44 PM UTC
Question

HTML in and email from AS3

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 is closed to new replies. Start a new post to keep the conversation going.

    11 replies

    Community Expert
    May 12, 2022 1:03 AM UTC

    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" ) ;}

    Translate
    kglad
    Community Expert
    Community Expert
    May 12, 2022 1:46 AM UTC

    that doesn't advance this thread.

    Translate
    kglad
    Community Expert
    Community Expert
    May 7, 2022 3:47 PM UTC

    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");

     

    Translate
    Known Participant
    May 7, 2022 4:07 PM UTC

    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?

    Translate
    kglad
    Community Expert
    Community Expert
    May 7, 2022 4:09 PM UTC

    no.  see your other post about this.

    Translate