Đang Thực Hiện

143884 Mail checker program - C++

We need 2 small components (C++ classes - written in VC++ 6.0), if can't do one of them, bid

anyway, but indicate which one you gonna do. First component to work with Yahoo Mail server,

using Yahoo Mail protocol (they don't allow POP3, have their own protocol), second to work

with Hotmail (they also don't allow POP3, utilize another protocol). I will provide sample

code which utilizes both protocols, you will just need to cut off unnecessary stuff and wrap

it inside interface (C++ class) with functionality described below.

Each component: connects to mail server, logs on (using provided username/password), counts

number of new e-mails and returns this count along with last unread item position (like

'cookie'). Upon first connection - it assumes no new e-mail, but then, counts from last

position ID (this ID is maintained by the caller). For example, I could have the following

in my mailbox initially:

msg1

msg2

When I call the component for the first time (e.g. call 'GetNewMail' method), it returns '0'

(no new e-mails) and some sort of position idenitifier (e.g. time of last e-mail or

something else, which uniquely identifes e-mail). Then imagine is a couple of new items

arrive in this mailbox:

msg1

msg2

msg3

msg4

When I call component this time and pass item ID from previous call, I get '2' (2 new

items). If a couple new items arrive again, I get '4' (2 previous + 2 new) etc.

The component shall return LastID along with count. For example if I had 6 items and

component treats 4 of them as new - the component would return ID of 6th item. 'time' field

of event, maybe, or something more unique, if possible). And then we would pass this ID to

component some of the call - and if we do - it returns count of items only since this ID.

For example if I had 6 items (the example above) and then 7th item arrive - I pass last ID -

and get '1' (only one new items since those 6).

Time field as ID is not good because 2 or more e-mails can arrive at the same second, or

daylight saving setting can be switching at the time of checking, so if possible, some sort

of more unique ID should be returned. However, if none exists, you can use time.

Also, component shall have 'ReadMail' method which opens web browser and logs it on

automatically so you don't have to enter webmail URL (e.g. [url removed, login to view] or [url removed, login to view])

and put username/password there.

I will provide sample code for component with similar functionality but implemented for

POP3. Basically it does all said above - logs on, counts new e-mails, return last position

etc. So you just need to replace POP3 code with hotmail/yahoo code extracted from my samples

(I'll provide thise to winning bidder).

Component interface, just to illustrate it better:

// Init

bool Init (LPCTSTR user, LPCTSTR password, std::string* err_msg)

// Run browser

bool CheckMail(IN std::string cookie, OUT int* num_new_emails, OUT std::string* err_msg)

// Check mail - open web browser and do autologin

bool ReadMail (OUT std::string* err_msg)

// Mark as Read - returns new cookie.

bool MarkAsRead(OUT std::string* new_cookie) = 0

Kỹ năng: Bất kì công việc gì, Lập trình C

Xem thêm: yahoo id samples, t$c, string in c programming, string c programming, programming classes, one and one webmail, if else c programming, get string c, get c programming, event programming, else if c programming, does c have classes, c string programming, c read example, c programming string, c programming if else, c programming get, c programming example, c programming classes, c programming class, classes programming, c get string, c for int, yahoo com e mail, g mail e mail

Về Bên Thuê:
( 25 nhận xét ) Saint Petersburg, Russian Federation

Mã Dự Án: #1890060

Đã trao cho:

techkey

Please read PMB.

$100 USD trong 2 ngày
(0 Đánh Giá)
0.0