[MERGE] Send actually *sends* the merge directive

John Arbash Meinel john at arbash-meinel.com
Fri Aug 10 16:39:10 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
> Alexander Belchenko wrote:
>> Aaron Bentley ?8H5B:
>>> Alexander Belchenko wrote:
>>>> Aaron Bentley ?8H5B:
>>>>> Here is a new patch that provides both Evolution and Thunderbird support.
>>>> bb:resubmit
>>>> Your patch does not work for me. Sorry.
>>> Thanks for the report.  This one should work for you.
>> bb:resubmit
> 
>> Now I got different exception.
>> Before traceback is splashed my editor was opened and prompted me
>> to describe a bundle.
> 
>> E:\Bazaar\mydev\aaron>python bzr --no-plugins send --mail-to bialix at ukr.net
>> Using saved location: file:///E:/Bazaar/mydev/bzr.dev/
>> bzr: ERROR: socket.error: (10061, 'Connection refused')
>> As I understand it's because I don't configure smtp_server in bazaar.conf.
>> But anyway, I don't think that in this case windows users (who usually
>> don't have smtp server in their localhost) should see such traceback.
> 
> I agree.  I think this is a bug in configuration handling; on Win32, we
> should not assume a local SMTP server.
> 
> And even Ubuntu does not have an SMTP server by default, so we should
> error cleanly if we incorrectly guess the smtp server.
> 
> This is not a bug in my code, however; it's in in
> smtp_connection.send_email.

Yeah, the smtp connection code should be trapping the socket and smtplib
errors and issuing a cleaner single-line "Connection failed" sort of error.


> 
>> BTW, is it possible to specify mail server that should work via SSL connection?
>> My email provider (ukr.net) allows me to use smtp via SSL only.
> 
> I don't know.  TLS is supposed to be automatically detected.
> 

TLS is a bit different. In that you negotiate it after connecting. So
you connect to the server, say EHLO, then ask to "STARTTLS" and then you
do commands like LOGIN, etc.

The current code is configured to always request STARTTLS, because if we
can't do it, it should just fail silently, but it means that we can
succeed most of the time. (Think of this as the Use TLS if Available
option in Thunderbirds SMTP server setting.)

However, for SSL, I believe you have to start the SSL connection
handshake, and then you send EHLO.

And I'm not sure if python's smtplib directly supports this. I think it
is something we could do, but probably not without a little bit of digging.


>> I think there is should be a way to look into windows registry to search
>> thunderbird executable. There are some keys in registry that holds
>> full path to thunderbird.exe. I'll try to investigate this and
>> prepare a patch.
>> Does full path to thunderbird.exe is enough for send command?
> 
> Yes, that should be all we need.
> 
> I suggest changing (Evolution|Thunderbird)_client_commands to
> _get_client_commands(), and doing your registry lookup there.
> 
> Aaron

Well, that and having T-bird > 1.5. Since apparently their handling of
starting a new mail from the command line (with an attachment) wasn't
very good.

However, if you are looking to do a *nice* windows e-mail system. We
really should be looking into MAPI.
http://en.wikipedia.org/wiki/MAPI

Basically, all the mail applications on Windows that I know of support
it. Which means you can spawn Outlook/Tbird/Outlook Express/whatever,
and spawn whatever happens to be the current default. It is actually a
decent system, though I believe it depends on all the COM etc stuff, and
is proprietary to MS.

I don't personally know how to do it. But I'm sure Tbird and Outlook
supports it. Since when you have the screen locked Windows XP can tell
you how many emails you have waiting. Which was working for me with both
Tbird or Outlook Express.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGvIadJdeBCYSNAAMRAnrSAJ4t+eh/Wwm9DpqGdEWh12RgSE/VwgCg2AiJ
LUzywOy4OMnP8x1i8QGvL7Q=
=fj7e
-----END PGP SIGNATURE-----



More information about the bazaar mailing list