6 Replies Latest reply on Oct 26, 2012 9:02 AM by philmodjunk

    Include map screenshot in email?

    Epa

      Title

      Include map screenshot in email?

      Post

           I am setting up an email button that will add various fields to the body of an email.  Since the maps on my layout aren't really database "fields", I am unsure how to do this.  Basically, I just want a small map to appear at the bottom of an auto populated email based on a contacts address.

           P.S. On a somehwat related note, does anyone have a reference for formatting a "send email" function?  I know the ¶ creates a new line, but don't know all of the operators.  Thanks.

        • 1. Re: Include map screenshot in email?
          philmodjunk

               Emails from Send Mail are plain text. You cannot include graphics and your formatting options are limited to tags, returns (the pilcrow that you mention) and using All caps. For more sophisticated formatting using HTML tags, you'll need to use an email plug in of which there are several available.

               You can attach a file with the graphic as an attachment however.

          • 2. Re: Include map screenshot in email?
            Epa

            In the contacts starter solution, I believe there is a script that pre populates an email with the contacts information and includes a snapshot of the map.  Would I need to create a new layout for map snapshots?

            • 3. Re: Include map screenshot in email?
              philmodjunk

                   The starter solution does not include the map in the body of the email. It can send an email, but there's no map in it.

                   You can use save as PDF to generate a PDF of a layout that includes your web viewer with the map and then attach the PDF to the email. This can all be scripted.

              • 4. Re: Include map screenshot in email?
                Epa
                /files/7fe622d9de/Snapshot_10%3A26%3A12_11%3A50_AM.png 937x647
                • 5. Re: Include map screenshot in email?
                  Epa

                       The above script, formats the email this way.  I am trying to dupicate this action and not really sure where I got this script from.

                  • 6. Re: Include map screenshot in email?
                    philmodjunk

                         That script is in the contacts starter solution, but it is actually sending the graphic of the map as an attachment. Some email programs will display the attached graphic automatically, others will require that the user click a control to download/view the attached graphic.

                         The only difference between what I described earlier and this, is that is uses the new Insert from URL script step to extract the map graphic and insert in into a container so that it can be exported as a Jpg file for attachment to the email. No special layout is required for this as the send mail step is simply attaching the graphic file to the email. (You can see this in the above script if you double click the send mail script step and then note that the attachment check box is selected. If you click that check box, you'll see the dialog where the $Path variable is used to attach the graphic file created by the export field contents script step.)