MozillaZine

Quick Reply Extension

Discussion of features in Mozilla Thunderbird
dwlt
 
Posts: 5
Joined: June 19th, 2003, 8:55 am
June 20th, 2003, 5:48 am

Post Posted June 20th, 2003, 5:48 am

Since there's been a lot of clamouring for this, and since I'd quite like to have it, I've taken it upon myself to build it :shock:

However, since I'm new to hacking Mozilla, I'm going to need some help in terms of figuring out how to communicate with the mail delivery system, and also how to extract the currently selected email in the message list view, how to access data inside mail message objects, etc. (I'm experimenting at the moment, but any pointers would be much appreciated!).

I already have the XUL in place for the feature.

My plan is to replicate M2's functionality exactly:

One unique feature of M2 is "Quick reply", which is useful for chat-like conversations. With Quick reply, you can type a short text that will be appended to the top of the original quoted message. When you are viewing a mail, type your message in the text box and click on the "Quick reply" button to send the reply. This will send the reply to all the recipients of the original e-mail.


Once I have a working version, I'll let everyone know. Hopefully, this will be sometime over the next week or two.

Wish me luck!
/dwlt

sgbouwhu

User avatar
 
Posts: 130
Joined: May 4th, 2003, 4:35 am
Location: Netherlands
June 20th, 2003, 8:38 am

Post Posted June 20th, 2003, 8:38 am

I'd love to help you, but I can't, yet :(. I'm gonna wish you luck though, cause i'd really really like this extension! Hope you'll be finished quickly, keep us posted!

dwlt
 
Posts: 5
Joined: June 19th, 2003, 8:55 am
June 20th, 2003, 1:16 pm

Post Posted June 20th, 2003, 1:16 pm

Alright, thanks for the support!

I'll try and post to this thread whenever I make more progress.
/dwlt

RAF
Moderator

User avatar
 
Posts: 12518
Joined: November 5th, 2002, 2:19 pm
Location: .nl
June 20th, 2003, 2:38 pm

Post Posted June 20th, 2003, 2:38 pm

dwlt wrote:Wish me luck!


Lots of it!

daneon
 
Posts: 21
Joined: March 24th, 2003, 1:31 am
June 21st, 2003, 2:35 am

Post Posted June 21st, 2003, 2:35 am

dwlt wrote:Wish me luck!


I'll be glad!!! sure you'll have it

mscott

User avatar
 
Posts: 2516
Joined: April 2nd, 2003, 4:10 pm
Location: Thunderbird Research Center, CA
June 22nd, 2003, 1:02 pm

Post Posted June 22nd, 2003, 1:02 pm

This should actually be a pretty straightforward extension to add to thunderbird. All of the information you need is available via JS from the mail 3-pane window. You just need to overlay in your text box with the reply button.

Someone PM'ed me asking for tips on how to do this. Here is what I said:

All the work should happen when the reply button is pressed. Nothing beforehand. Through various JS objects in the UI, you can get the message URI of the current message selection. You can also acquire the nsIMsgHdr object which will allow you to get all the fields you need for your quick reply. Package up the headers into a nsIMsgCompFields object (easily done in JS).

Not sure about how you get the body if you have to quote it. For a first pass, ignore quoting the body.

You will then create a nsIMsgSend object in JS and call createAndSendMessage which takes the following arguments. Many of these arguments will be null (such as the attachment fields). the identity, editor instance and comp fields all come from you. The identity is based on the currently selected account. The comp fields you create and fill in. The editor instance is the editor instance you created in your quick reply overlay.

Write a JS listener to get notified when the send is done and then clear the quick reply box. That's it!

in nsIEditor aEditor,
in nsIMsgIdentity aUserIdentity,
in nsIMsgCompFields fields,
in PRBool digest_p,
in PRBool dont_deliver_p,
in nsMsgDeliverMode mode,
in nsIMsgDBHdr msgToReplace,
in string attachment1_type,
in string attachment1_body,
in PRUint32 attachment1_body_length,
[const] in nsMsgAttachmentData attachments,
[const] in nsMsgAttachedFile preloaded_attachments,
in voidPtr relatedPart,
in nsIDOMWindowInternal parentWindow,
in nsIMsgProgress progress,
in nsIMsgSendListener aListener,
in string password
Thunderbirds are Go!

dwlt
 
Posts: 5
Joined: June 19th, 2003, 8:55 am
June 22nd, 2003, 2:18 pm

Post Posted June 22nd, 2003, 2:18 pm

Superb, thanks Scott! (That was me that PM'ed you, btw).

I already got the UI working, and as of yesterday have extracted the message URI and the header fields. I'm a bit unsure about the body, so I had planned on leaving that out for now.

I had been reading the code around createAndSendMessage yesterday, so at least now I know I'm on the write track!

All things being well, I should be able to get an alpha extension out this week :D
/dwlt

Rhubarb

User avatar
 
Posts: 51
Joined: April 23rd, 2003, 2:14 am
Location: Europe
June 23rd, 2003, 2:25 am

Post Posted June 23rd, 2003, 2:25 am

Aaaargghh.. :roll:

Independent of you, dwlt, I've been starting work on this extension myself (this 'll teach me). Since 2 of the same extensions is pretty useless, I guess I'll move to help you out instead. How far along are you?

I've got the basic reply construction & sending done, but still quite some work to be done to make it a true & actual reply.

One thing though: I've had a real fight with nsIMsgSend & createAndSendMessage. nsIMsgCompose, with it's Initialize and it's SendMsg did the trick for me.

Let me know (PM).
And He Said: "Rhubarb"

omiazad

User avatar
 
Posts: 40
Joined: September 20th, 2003, 11:16 pm
Location: Bangladesh
December 31st, 2004, 9:03 pm

Post Posted December 31st, 2004, 9:03 pm

I got an idea and I think if this part comes with Thunderbird then it would be another positive point for promoting Thunderbird.

I found some ISPs blocks sending mails, which don't have user@that.isp. This is a huge problem for them who lives in one home and have multiple email user under one internet connection. Simply, everyone cannot use the one email account provided by the ISP and everyone doesn't like to got to the hotmail/yahoo type webmail interface.

I think Thunderbird needs a self mail sending option without transfaring the mail to a SMTP server. Most ISPs blocks the operation if you are sending a mail to another SMTP server. Though you want to use the ISP's SMTP server, the server will check the sender's address and then block the mail.

To get rid of it people needs to depend on some tiny SMTP software for sending mails (like QK SMTP, 1st SMTP etc). A feature which can send the mail directly to the destination box, could be added in Thunderbird easily. I saw this feature in a mail application called FoxMail. In that application you can put 2 DNS server's IP of your choice and then depending on that DNS server the software delivers the mail directly to that destination box.

The feature I'm suggesting could be more enhanced in Thunderbird then FoxMail. In FoxMail you have to put the DNS's IP manually. But in Thunderbird an option could let you choose your option, either you want to put the DNS's IP manually (for those ISPs who blocks the SMTP feature) or Thunderbird should detect the IP from the Internet connection (for those ISP who use dynamic DNS server). If you want to check the feature of FoxMail, you are invited in http://fox.foxmail.com.cn/english2.htm

My Developer Frineds, Please think about it.
Omi Azad
Contributor
Bangla Computing and Localization Projects
Ankur: http://www.ankurbangla.org
Ekushey: http://www.ekushey.org

Return to Thunderbird Features


Who is online

Users browsing this forum: No registered users and 1 guest