Service Virtualization

  • 1.  Vsm that listens to an email server

    Posted Jan 20, 2017 05:49 PM

    I am trying to listen to a mail box where I can obtain an email and its attachment. 

    Has anyone done something similar?



  • 2.  Re: Vsm that listens to an email server

    Broadcom Employee
    Posted Jan 24, 2017 02:26 PM

    What is the protocol email server supports?  you probably need customization, I don't think we have anything out of the box. 



  • 3.  Re: Vsm that listens to an email server

    Posted Jan 24, 2017 02:42 PM

    You are most likely going to have to use TCP to perform the virtualization.  I doubt that you will get a whole lot without adding in some sort of Custom DPH (Scriptable or Java) to handle data extraction.

     

    Review this post. SMTP Virtualization   Bhavin seems to have attempted a virtualization at one time or another.



  • 4.  Re: Vsm that listens to an email server

    Posted Jan 24, 2017 06:27 PM

    Joel,

    I read Bhavin's post. We are not trying to simulate the STMP server. We need to listen to a mail server to be able to take further actions based on specific emails sitting in the inbox. Those "actions" would be the process to be virtualized.

    In summary: after being notified of an email, we need to obtain the email itself, open an attachment using a third party api, update the attachment, attach the updated file to a new email and send it to a new mailbox.

    Yes I can see a lot of customization and scripting involved.



  • 5.  Re: Vsm that listens to an email server

    Posted Jan 25, 2017 07:34 AM

    Sorry for the misunderstanding.  Nothing OOTB that I know of will handle these steps.  



  • 6.  Re: Vsm that listens to an email server
    Best Answer

    Posted Jan 26, 2017 10:04 AM

    I've done this and it took a custom extension. Fortunately, it's not too difficult. If you search for examples using the javax.mail package to receive email and you'll find lot's of code you can copy.



  • 7.  Re: Vsm that listens to an email server

    Posted Oct 02, 2017 01:34 PM

    Hi Brian

     

    Is it possible to share your custom extension to me @ vibhashhpathak@gmail.com

    We are also looking for a solution where we just want to listen to the incoming emails.

     

    Thanks,

    Vibhash



  • 8.  Re: Vsm that listens to an email server

    Posted Oct 03, 2017 09:06 AM

    Vibhash,

     

    Sorry, I wrote this at work, so I'm not free to share the source code.

     

    The approach I took was to use a CustJavaNodeInterface and the JavaMail package. If you get examples of code using those packages, you'll be about 90% complete.