2 Replies Latest reply on Jun 30, 2006 10:33 AM by Applied CD

    Email via PostNetText -> ASP -> SMTP?

    Applied CD Level 1
      Sorry to keep posting about emailing from Director but our client has a security obsessed IT department that has shut down all external network ports and services except plain vanilla HTTP transactions on port 80 … that means two services we take for granted, SMTP (port 25) and FTP (port 21) are not available to us. I’m trying to come up with a scheme that allows users in this environment to send HTML formatted email from Director with images (JPG’s) either as attachments or inline. I’ve got two remaining work arounds that still show promise but they both get into areas of programming I’m not very familiar with (I can read and modify ASP code but haven’t written much from scratch, everything I know about MAPI I’ve learned in the last two days). If anyone has made this work I would appreciate some advice:

      1. We’re trying to use an xtra called mevDllBinder to interface with MAPI32.dll We have been assured that all users of our software will have MS Outlook installed and properly configured, so, using extended MAPI we should be able to send HTML email whether the end user is using POP3/SMTP or MS Exchange server. I’ve gotten this to work on Win2K/Outlook Express 6 but not on WinXP/Outlook 2003.

      2. My other thought is to transmit the email data via postNetText to an ASP form processor (that we would either write or borrow) running on our server. Once the data is out of our client’s restrictive environment we could take the data from postNetText and use ASP to reformat and relay the email using either CDONTS or CDOSYS to our own SMTP server. I know (well, I’m pretty sure) I can get the email body and addressing information properly handled but what about the attachments? I’m not sure I can use postNetText to get a binary file attached to the email (and as previously mentioned, we can’t just FTP the file)

      It’s a big project and the client really blind sided us with these restrictions … yes, we asked before we started but of course the client’s didn’t really know much about their own network and they were much more interested in how pretty the screens would be rather than if it would work or not :-( … anyway, sorry for venting.
        • 1. Re: Email via PostNetText -> ASP -> SMTP?
          Level 7
          Didn't get from your post if you can compose and send the e-mail you want
          without the port restriction. If you can, and if the 'big project' is worth
          it, you could setup an smtp server (outside the client's network) to listen
          to port 80 - the client you are using should be using the serverIP:80 to
          send the mail. Should work, but I doubt it would be easy to set it up, plus
          you mentioned some XP issues.
          Besides, the method (1) you mentioned would best be avoided because of too
          many external dependencies.

          (2) Using postNetText sounds a much wiser solution. Send the raw data, and
          then handle them serverSide. As for the binary content, read them and base64
          encode them. That's how mailers do it, btw. Now, for creating the mail
          (serverSide), the simplest method would be to base64 decode the data, save
          them to disk, and use some app to generate the mail+attachments. The best
          solution would be to generate the mail (in asp or other ss-script) using the
          (already base64 encoded data), but that would require knowledge of multipart
          encoding.

          (3) If you can spare an IP, then, probably the best method with the
          available tools would be to create a director movie that would be using the
          multiuser Xtra, listening at port 80. Read all data you want client side,
          use the muXtra to send it to the remote (server-side movie) and do all
          processing there (compose and send the mail using any method you want).

          (4) If all of the above fail or seem/prove to be too hard to implement, mail
          me off-list at info at rebus gr.



          "Applied CD" <webforumsuser@macromedia.com> wrote in message
          news:e81di1$h13$1@forums.macromedia.com...
          > Sorry to keep posting about emailing from Director but our client has a
          > security obsessed IT department that has shut down all external network
          > ports
          > and services except plain vanilla HTTP transactions on port 80 ? that
          > means two
          > services we take for granted, SMTP (port 25) and FTP (port 21) are not
          > available to us. I?m trying to come up with a scheme that allows users in
          > this
          > environment to send HTML formatted email from Director with images (JPG?s)
          > either as attachments or inline. I?ve got two remaining work arounds that
          > still
          > show promise but they both get into areas of programming I?m not very
          > familiar
          > with (I can read and modify ASP code but haven?t written much from
          > scratch,
          > everything I know about MAPI I?ve learned in the last two days). If anyone
          > has
          > made this work I would appreciate some advice:
          >
          > 1. We?re trying to use an xtra called mevDllBinder to interface with
          > MAPI32.dll We have been assured that all users of our software will have
          > MS
          > Outlook installed and properly configured, so, using extended MAPI we
          > should be
          > able to send HTML email whether the end user is using POP3/SMTP or MS
          > Exchange
          > server. I?ve gotten this to work on Win2K/Outlook Express 6 but not on
          > WinXP/Outlook 2003.
          >
          > 2. My other thought is to transmit the email data via postNetText to an
          > ASP
          > form processor (that we would either write or borrow) running on our
          > server.
          > Once the data is out of our client?s restrictive environment we could take
          > the
          > data from postNetText and use ASP to reformat and relay the email using
          > either
          > CDONTS or CDOSYS to our own SMTP server. I know (well, I?m pretty sure) I
          > can
          > get the email body and addressing information properly handled but what
          > about
          > the attachments? I?m not sure I can use postNetText to get a binary file
          > attached to the email (and as previously mentioned, we can?t just FTP the
          > file)
          >
          > It?s a big project and the client really blind sided us with these
          > restrictions ? yes, we asked before we started but of course the client?s
          > didn?t really know much about their own network and they were much more
          > interested in how pretty the screens would be rather than if it would work
          > or
          > not :-( ? anyway, sorry for venting.
          >


          • 2. Re: Email via PostNetText -&gt; ASP -&gt; SMTP?
            Applied CD Level 1
            Thanks for the detailed response. I just got back from a meeting with the client’s IT department and everyone is onboard with DIR -> ASP -> SMTP being the only workable solution. As for handling binaries, we had a good test this morning. I found a free ASP script that is a simple uploader that will move files from our client’s local machine and deposit them on our server through port 80 (we tested with a simple HTML front end form and it works). This is better than attaching the binaries to the email. When the user clicks “Submit form via email” we will first upload the binary and tag it with a unique identifier (actually, I’m just adding the sender’s email address as a prefix to the filename with non-alphaNum characters replaced by underscores) I can then take my HTML email body string and replace token image src tags with fully qualified URL’s that point to the uploaded images. We then post the email body string and address strings to my sendMail ASP script and the recipient should receive a nicely formatted email with inline pictures that requires little or no space in his/her mail box, all of the image storage will be centralized on my server (these forms have a life cycle of exactly 1 year, so I can safely delete them all when the program is complete.)