Skip to Content

When we have watches on SDN and there is an interesting post, we always have something in our mind. It’s all about a thirst of having a new feature enabling SDN users to reply to watches which gets posted directly in SDN! This is my small contribution to SDN for implementing this new feature. I am sorry if this feature is already present and currently disabled. Even if it is so, the code may be useful to several others who may use it in Webdynpro/Java appliciation for other purposes! This blog is a small initiative towards SDN and Open Source by Craig Cmehil

Introduction

The blog is about implementing a new feature in SDN, which enables users to post directly in SDN by replying from their outlook. In this part of the blog series, I will be explaining about the architectural design how it’s going to work.

Design

image

Explanations for the numbers in the diagram

  1. Mail from SDN subscribed to watch a forum / post.
  2. Reply post from email to POP3 / IMAP server.
  3. Mail fetched by SDN_JPost, analyses and posting it into SDN.
  4. Posting it directly into SDN, identifying the specific forum / thread using the user id and password.

The whole implementation can be divided into two major modules (from Java perspective) namely

  1. Fetching emails from POP3/IMAP server and parsing it to find the parameters (email, thread id and forum id)
  2. Posting it into the SDN forum.

Planning

In development environment, I have a pop3 server running to which I will be sending my replies. SDN_JPost is a simple Java code or thread, constantly fetching mails from the pop3 server, parsing it and posting the reply to SDN.

The key factor in the whole implementation is about posting the reply from the email to SDN. For this, first we must understand the landscape of SDN from outside well. Posting into SDN requires a user id and password. Since email can be used for user id, the email from which the mail is sent can be used as user id. There must be some way SDN_JPost must know the password for the user id/email. Right now, here in development environment, I preferred to send the password as the first line in my message (though it is not preferred, this is until the java code has direct access to user id / passwords).

Key Design

Once thread id, forum id, user id and password is known to SDN_JPost, the reply is directly posted into SDN Forums. But how is it done? First, using the user id and password, login is done by SDN_JPost which saves all session cookies in memory and posts the reply to the corresponding forum. Since session cookies are in memory, the post is done successfully. The session cookies are cleared for processing the next reply from the mail box. Since, the post is authorized initially by the user’s id and password; there cannot be any flaw in between.

In the next blog of this series, we shall see the complete implementation (with source code) of SDN_JPost (the key Java program) fetching email from the POP3 server. Finally in the last blog of the series, we will be seeing the most important functionality of SDN_JPost, posting the mail reply directly to SDN Forums.

Next >>

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Community User Post author
    Remember this is not an official solution from SDN, this is a solution from one of SDN’s Top Contributors but it is by no means supported by SDN and should be used at your own risk – if at all!

    Craig Cmehil
    SDN Community Evangelist

    (0) 
  2. Community User Post author
    Remember this is not an official solution from SDN, this is a solution from one of SDN’s Top Contributors but it is by no means supported by SDN and should be used at your own risk – if at all!

    Craig Cmehil
    SDN Community Evangelist

    (0) 
  3. Community User Post author
    Remember this is not an official solution from SDN, this is a solution from one of SDN’s Top Contributors but it is by no means supported by SDN and should be used at your own risk – if at all!

    Craig Cmehil
    SDN Community Evangelist

    (0) 
  4. Gregor Wolf
    Hello Felix,

    I remember a long time ago SDN tried to estabish a NNTP Gateway for the Forums. So I tried again today and the Server news.sap.com is still reachable. But my test message in the Group sap.public.sdn.test does not reach the Test Forum. But this will be great. NNTP also allows SSL and authentication. So posting with a wrong ID could be prevented. One advantage of the NNTP solution is that there are existing SMTP-News Gateways.

    But the NNTP solution has the same problem as the E-Mail response: Points for solution could not set directly.

    Regards
    Gregor

    (0) 
    1. Gregor,

      NNTP is really a better way! May be I can use XI to syncronize the posts to SDN Forums 😉

      I will give a try for that!

      Regards,
      Felix

      (0) 
  5. Gregor Wolf
    Hello Felix,

    I remember a long time ago SDN tried to estabish a NNTP Gateway for the Forums. So I tried again today and the Server news.sap.com is still reachable. But my test message in the Group sap.public.sdn.test does not reach the Test Forum. But this will be great. NNTP also allows SSL and authentication. So posting with a wrong ID could be prevented. One advantage of the NNTP solution is that there are existing SMTP-News Gateways.

    But the NNTP solution has the same problem as the E-Mail response: Points for solution could not set directly.

    Regards
    Gregor

    (0) 
    1. Gregor,

      NNTP is really a better way! May be I can use XI to syncronize the posts to SDN Forums 😉

      I will give a try for that!

      Regards,
      Felix

      (0) 
  6. Gregor Wolf
    Hello Felix,

    I remember a long time ago SDN tried to estabish a NNTP Gateway for the Forums. So I tried again today and the Server news.sap.com is still reachable. But my test message in the Group sap.public.sdn.test does not reach the Test Forum. But this will be great. NNTP also allows SSL and authentication. So posting with a wrong ID could be prevented. One advantage of the NNTP solution is that there are existing SMTP-News Gateways.

    But the NNTP solution has the same problem as the E-Mail response: Points for solution could not set directly.

    Regards
    Gregor

    (0) 
    1. Gregor,

      NNTP is really a better way! May be I can use XI to syncronize the posts to SDN Forums 😉

      I will give a try for that!

      Regards,
      Felix

      (0) 

Leave a Reply