3 Replies Latest reply on Mar 21, 2014 10:43 PM by user19752

    360Works email question

    KylePutzier

      I cannot get the EmailAttachFileInline function to behave. In the script below, I have allowed for up 3 images to be included inline. If there is no "Pic2" (or 1 or 3), the plugin errors with an unknown error. I've tried to add a case statement to test for the presence of the Pic to replace and do nothing if there is no Pic to replace. Also tried to test for the presence of a valid picture in the corresponding container.

       

      What am I doing wrong?

       

       

       

      EmailCreate (

      "kputzier@inventivelabel.com";

      "kputzier@inventivelabel.com";

      "Test Email")

      and

      EmailSetBody(

      _Contacts::Letter_BodyCalc_CSS; "html" )

      and Case(PatternCount ( _Contacts::Letter_BodyCalc_CSS ; "cid:Pic1" ) = 0;"";EmailAttachFileInline( Contacts | Misc_Letters_Pic1::Letter_AvailablePictures ; "Pic1" ))

      and Case(PatternCount ( _Contacts::Letter_BodyCalc_CSS ; "cid:Pic2" ) = 0;"";EmailAttachFileInline( Contacts | Misc_Letters_Pic2::Letter_AvailablePictures ; "Pic2" ))

      and Case(PatternCount ( _Contacts::Letter_BodyCalc_CSS ; "cid:Pic3" ) = 0;"";EmailAttachFileInline( Contacts | Misc_Letters_Pic3::Letter_AvailablePictures ; "Pic3" ))

      and

      EmailSend (

      "progress=" & _Contacts::x_Email_ProgressBar;

      "progresslocation=" & _Contacts::x_Email_ProgressLocation)