EmailtoBlog - PowerPoint PPT Presentation

About This Presentation
Title:

EmailtoBlog

Description:

This Is The 'Email-to-blog' System Architecture. Let's Consider How It Works ... returned -1, the email address is not associated with a blog. ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 17
Provided by: NIX
Category:
Tags: emailtoblog | blog

less

Transcript and Presenter's Notes

Title: EmailtoBlog


1
Email-to-Blog How It Works
2
This Is The Email-to-blog System Architecture
3
Lets Consider How It Works
4
1. How the Blog User posts a message to Blog
Blog User composes an email message and sends it
to a special email address, for instance
to Each blog
has its own pre-defined email address but all the
blog messages are forwarded to the same physical
mailbox.
5
1. How the Blog User posts a message to Blog




From To ution.net Subject My first blog
6
1. How the Blog User posts a message to Blog

MailboxWatcher is a Java class that
continuously (every 30 sec) checks the mailbox
for new messages via POP3 protocol. So, there is
a new message in mailbox and MailboxWatcher
will detect it soon and start to process it.
7
1. How the Blog User posts a message to Blog

8
1. How the Blog User posts a message to Blog

So, MailboxWatcher has dowloaded the message. Now
it has to perform a series of checks.
9
1. How the Blog User posts a message to Blog

1) Is the recipient email address ("To" or "Cc"
header of the message) associated with a
blog? MailboxWatcher uses BlogBean.getBlogIdByEma
il(email) method in order to check this
condition. If the method has returned -1, the
email address is not associated with a blog. In
this case the message is being skipped.
10
1. How the Blog User posts a message to Blog

BlogBean.getBlogIdByEmail(email) performs a
database query SELECT ID FROM BLOGS WHERE
LOWER(EMAIL)comments_at_
Blog ID1
And finds out that the associated blog ID 1 So,
the returned value is 1.
11
1. How the Blog User posts a message to Blog

2) Is the sender allowed to post messages to the
specific blog (Blog ID 1)? MailboxWatcher
performs 3 kinds of tests in order to check this
condition.
12
1. How the Blog User posts a message to Blog

2.1. Is the exact senders email address ("From"
header of the message) listed in the "authorized
users" table for this Blog?
13
1. How the Blog User posts a message to Blog

AuthorBean.getAuthorByEmail(email) performs a
database query SELECT ID,NAME FROM AUTHORS WHERE
LOWER(EMAIL)user_at_host...
Allowed
And finds out that the sender is in the
database. Now its time to check if the sender is
allowed to post messages to the
blog. MailboxWatcher calls blog.isAuthorAllowed(se
nder) method to check this condition.
14
1. How the Blog User posts a message to Blog

2.2. If the exact senders email address is NOT
listed in the "authorized users" table for this
Blog, then MailboxWatcher will try to find
so-called domain-wide user (a email address like
"_at_host.com") in the table. The existence of the
domain-wide user allows to post messages from
any email address that belongs to the
appropriate domain.
15
1. How the Blog User posts a message to Blog

2.3. If the domain-wide email address is NOT
listed in the "authorized users" table for this
Blog, then MailboxWatcher will try to find
so-called PUBLIC user in the table for the blog.
The existence of PUBLIC user allows to post
messages from any email address.
16
1. How the Blog User posts a message to Blog

If the sender is allowed (according to at least
one of the 3 tests) to post messages,
MailboxWatcher calls MessageBean.addMessage()
method to store the message in database.
Write a Comment
User Comments (0)
About PowerShow.com