3 Replies Latest reply on Jul 23, 2013 6:34 AM by kglad

    Arabic text not sending in email,,,

    Emraan.Khan Level 1

      Arabic text not sending in email,,, its showing subject="undefined" and message="undefined"

       

       

                                                                            my code is

       

       

       

      import com.xvisage.utils.StringUtils;

      stop();

      import mx.transitions.Tween;

      import mx.transitions.Zoom.*;

      var myGalleryXML = new XML();

      myGalleryXML.ignoreWhite = true;

       

      myGalleryXML.load("gallery.xml")

       

       

      mytype =  myImages[0].attributes.type;

       

      if(mytype=='ar'){

          _root.subject_box._visible = false;

          _root.message_box._visible = false;

      }

      else{

          _root.subject_box_ar._visible = false;

          _root.message_box_ar._visible = false;

      }

       

       

       

                      System.useCodepage = true;

                      send_btn.onRelease = function() {

                      my_vars = new LoadVars();

                      my_vars.sender = email_box.text;

         

         

      if

      (mytype=='en')

       

      {

          my_vars.subject = subject_box.text;

          my_vars.message = message_box.text;

      }

      else

          {   

         

      var format:TextFormat = new TextFormat();

      subject_box_ar.htmlText = StringUtils.parseArabic(subject_box_ar, format);

      subject_box_ar.setTextFormat(format);

         

         

      var format2:TextFormat = new TextFormat();

         

      message_box_ar.htmlText = StringUtils.parseArabic(message_box_ar, format2);

      message_box_ar.setTextFormat(format2);

       

      my_vars.subject = subject_box_ar.text;

      my_vars.message = message_box_ar.text;   

         

       

         

          }

         

          if (my_vars.sender != "" and my_vars.subject != "" and my_vars.message != "") {

              my_vars.sendAndLoad("/sendmail", my_vars, "POST");

            

       

              gotoAndStop(72);

          } else {

              error_clip.gotoAndPlay(2);

          }

          my_vars.onLoad = function() {

              gotoAndStop(73);

          };

      };

      email_box.onSetFocus = subject_box.onSetFocus=message_box.onSetFocus=function () {

          if (error_clip._currentframe != 72) {

              error_clip.gotoAndPlay(6);

          }

      };

        • 1. Re: Arabic text not sending in email,,,
          kglad Adobe Community Professional & MVP

          the problem is most likely in sendmail.  to confirm use the trace statement:

           

          my_vars.subject = subject_box_ar.text;

          my_vars.message = message_box_ar.text;   

          trace(my_vars.subject);

          trace(my_var.messages);

           

          ///////

          if that's what you expect, what's in sendmail?

          • 2. Re: Arabic text not sending in email,,,
            Emraan.Khan Level 1

            it's showing in email '?????????????' what shuld i do for this,, please currection in my code

             

            import com.xvisage.utils.StringUtils;

            stop();

            import mx.transitions.Tween;

            import mx.transitions.Zoom.*;

            var myGalleryXML = new XML();

            myGalleryXML.ignoreWhite = true;

             

            myGalleryXML.load("gallery.xml")

             

             

            mytype =  myImages[0].attributes.type;

             

            if(mytype=='ar'){

                _root.subject_box._visible = false;

                _root.message_box._visible = false;

            }

            else{

                _root.subject_box_ar._visible = false;

                _root.message_box_ar._visible = false;

            }

             

             

             

                            System.useCodepage = true;

                            send_btn.onRelease = function() {

                            my_vars = new LoadVars();

                            my_vars.sender = email_box.text;

             

             

            if

            (mytype=='en')

             

            {

                my_vars.subject = subject_box.text;

                my_vars.message = message_box.text;

            }

            else

                {   

             

            var format:TextFormat = new TextFormat();

            var format:TextFormat = new TextFormat();

             

            format.font = "Arial";

            format.size = 18;

            format.color = 0x333333;


            subject_box_ar.htmlText = StringUtils.parseArabic(subject_box_ar, format);

            subject_box_ar.setTextFormat(format);

             

             

            var format2:TextFormat = new TextFormat();

             

            var format2:TextFormat = new TextFormat();

             

            format2.font = "Arial";

            format2.size = 18;

            format2.color = 0x333333;

             

            message_box_ar.htmlText = StringUtils.parseArabic(message_box_ar, format2);

            message_box_ar.setTextFormat(format2);

             

            my_vars.subject = subject_box_ar.text;

            my_vars.message = message_box_ar.text;   

             

             

             

                }

             

                if (my_vars.sender != "" and my_vars.subject != "" and my_vars.message != "") {

             

                    my_vars.sendAndLoad("/sendmail.php", my_vars, "POST");

             

             

                    gotoAndStop(72);

                } else {

                    error_clip.gotoAndPlay(2);

                }

                my_vars.onLoad = function() {

                    gotoAndStop(73);

                };

            };

            email_box.onSetFocus = subject_box.onSetFocus=message_box.onSetFocus=function () {

                if (error_clip._currentframe != 72) {

                    error_clip.gotoAndPlay(6);

                }

            };

            • 3. Re: Arabic text not sending in email,,,
              kglad Adobe Community Professional & MVP

              what do those trace statements show when you test in flash?