What you want to do is exactly what does MAPI. Unfortunately, the MAPI code has not yet landed on the trunk (if I am right). Basically, you will need to create a nsIMsgCompField object , set the different values you want and then create a nsIMsgSend object and use the API CreateAndSendMessage.
Jean-Francois seth spitzer wrote: > shadows, > > >> Does anyone know if there is any scriptable Mail Sending XPCom Component >> that I can use from JavaScript? What I would like to do is assemble >> an email >> with to,cc,bcc, body and attachment and then send it. Any pointers to >> examples or any tips would really help. >> Or if there is another easy way even better... > > > It should be doable, as our compose window is writting in JS. But I > haven't tried. > > > I'd look at how the compose window works. See > http://lxr.mozilla.org/mozilla/source/mailnews/compose/resources/content > > > For the interfaces, start with: > > http://lxr.mozilla.org/mozilla/source/mailnews/compose/public/nsIMsgCompose.idl > > >http://lxr.mozilla.org/mozilla/source/mailnews/compose/public/nsIMsgComposeService.idl > > > > Note, none of the mailnews interfaces are frozen so the interfaces > might change from underneath you. > > If you get it working, let us known so we can work with you ahead of > time when interfaces change. > > -Seth > > >
