Re: [Evolution] The SMTP Problem...



attached is a patch.

Jeff

On Sat, 2003-01-04 at 17:30, Jeffrey Stedfast wrote:
On Sat, 2003-01-04 at 16:37, Bill Hartwell wrote:
On Sat, 2003-01-04 at 14:10, Jeffrey Stedfast wrote:
what message was the reply to? maybe you can try reproducing the
problem? and/or maybe I can take a look to see if anything stands out
that may have caused the problem?

Jeff

On Sat, 2003-01-04 at 16:11, Bill Hartwell wrote:
Now the question comes of...how did Evolution queue a message with no
recipients? For that matter, how did it lose the recipients when it was
nothing more than a reply to a message on the list, which should have
automatically brought the addresses over from the message it was a reply
to?

The subject was "Built-in spam filtering?" and the message number was
1041547319 12478 16 camel lostzed mmc com au

thanks


I figure if you still have it in your message folders and can pull it
up, it'll save a little bandwidth - and reduce the risk of something
getting changed in transit.

yep, I still got it...


A possible solution that comes to my mind is that maybe the address got
garbled or lost if it was one of those I trimmed down by deleting the
ccs and copying the address I wanted to send it to from the Cc: field to
the To: field. Since I have the mailing lists in my address book, they
don't show up as addresses in the message editing display - instead,
they show up with the IDs they have in my address book. Would cut/paste
from one field to another break the link to the address book so that the
ID is dereferenced?

it seems that it does. I just added "evolution users"
<evolution ximian com> to my contacts database and then did a Reply-All
to the message and then trimmed out the To: address (Not Zed) and then
copied the "evolution users" string that represented the
evolution ximian com address in the Cc: field and pasted it into the To:
field and then deleted the Cc: field and hit Send, and you are right -
the addressbook is not properly resolving the "evolution users" string
into evolution ximian com and so feeds the mailer an empty address
string for the To: field.

The code that checks to make sure there are valid recipients simply
checks that there are EDestination structures (which there are, but the
EDestination structure representing the string "evolution users" does
not have an address to go with it).

I think I can probably modify the mailer to be more thorough when
checking that the message has recipients when you try to send (to
protect against this sort of thing).

Jeff
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1681.2.5
diff -u -r1.1681.2.5 ChangeLog
--- camel/ChangeLog     16 Dec 2002 00:49:36 -0000      1.1681.2.5
+++ camel/ChangeLog     4 Jan 2003 23:04:30 -0000
@@ -1,3 +1,10 @@
+2003-01-04  Jeffrey Stedfast  <fejj ximian com>
+
+       * providers/smtp/camel-smtp-transport.c (smtp_send_to): Instead of
+       checking recipients != NULL, check that camel_address_length
+       (recipients) != 0 since it is illegal for recipients to be NULL
+       (camel_transport_send_to already checks this).
+
 2002-12-15  Jeffrey Stedfast  <fejj ximian com>
 
        * camel-multipart-signed.c (camel_multipart_signed_verify): Don't
Index: camel/providers/smtp/camel-smtp-transport.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/smtp/camel-smtp-transport.c,v
retrieving revision 1.124
diff -u -r1.124 camel-smtp-transport.c
--- camel/providers/smtp/camel-smtp-transport.c 7 Oct 2002 18:13:53 -0000       1.124
+++ camel/providers/smtp/camel-smtp-transport.c 4 Jan 2003 23:04:31 -0000
@@ -698,14 +698,14 @@
                return FALSE;
        }
        
-       if (!recipients) {
+       len = camel_address_length (recipients);
+       if (len == 0) {
                camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
                                      _("Cannot send message: no recipients defined."));
                camel_operation_end (NULL);
                return FALSE;
        }
        
-       len = camel_address_length (recipients);
        cia = CAMEL_INTERNET_ADDRESS (recipients);
        for (i = 0; i < len; i++) {
                if (!camel_internet_address_get (cia, i, NULL, &addr)) {
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2444.2.8
diff -u -r1.2444.2.8 ChangeLog
--- mail/ChangeLog      3 Dec 2002 16:05:29 -0000       1.2444.2.8
+++ mail/ChangeLog      4 Jan 2003 23:04:39 -0000
@@ -1,3 +1,13 @@
+2003-01-04  Jeffrey Stedfast  <fejj ximian com>
+
+       * mail-callbacks.c (composer_get_message): Use
+       e_destination_get_email() instead of e_destination_get_address()
+       when checking that we have a list of valid recipients to send the
+       message to because get_email() returns the addr-spec portion of
+       the address, which is what we care about. if that doesn't exist,
+       then the address is useless. This does all we can do mailer-side
+       for the recent "SMTP Problem" thread.
+
 2002-12-02  Jeffrey Stedfast  <fejj ximian com>
 
        * mail-callbacks.c (guess_me_from_accounts): Use the same logic as
Index: mail/mail-callbacks.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-callbacks.c,v
retrieving revision 1.399.2.1
diff -u -r1.399.2.1 mail-callbacks.c
--- mail/mail-callbacks.c       3 Dec 2002 16:05:50 -0000       1.399.2.1
+++ mail/mail-callbacks.c       4 Jan 2003 23:04:40 -0000
@@ -481,7 +481,7 @@
        /* see which ones are visible/present, etc */
        if (recipients) {
                for (i = 0; recipients[i] != NULL; i++) {
-                       const char *addr = e_destination_get_address (recipients[i]);
+                       const char *addr = e_destination_get_email (recipients[i]);
                        
                        if (addr && addr[0]) {
                                num++;
@@ -498,7 +498,7 @@
        recipients_bcc = e_msg_composer_get_bcc (composer);
        if (recipients_bcc) {
                for (i = 0; recipients_bcc[i] != NULL; i++) {
-                       const char *addr = e_destination_get_address (recipients_bcc[i]);
+                       const char *addr = e_destination_get_email (recipients_bcc[i]);
                        
                        if (addr && addr[0])
                                num_bcc++;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]