mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
This reverts commit 0c2e06133c
.
The patch would cause an extra SMTP connection on _any_ meesage with
attachments. Marcus is headed away on holiday and asked me to revert it
for him (after I asked him to revert it) - With luck, we'll talk through
a design to work around this issue on the list
Conflicts:
src/com/fsck/k9/mail/transport/SmtpTransport.java
This commit is contained in:
parent
3d583da450
commit
31adcd2ed8
@ -352,20 +352,11 @@ public class SmtpTransport extends Transport {
|
|||||||
// If the message has attachments and our server has told us about a limit on
|
// If the message has attachments and our server has told us about a limit on
|
||||||
// the size of messages, count the message's size before sending it
|
// the size of messages, count the message's size before sending it
|
||||||
if (mLargestAcceptableMessage > 0 && ((LocalMessage)message).hasAttachments()) {
|
if (mLargestAcceptableMessage > 0 && ((LocalMessage)message).hasAttachments()) {
|
||||||
if (K9.DEBUG_PROTOCOL_SMTP) {
|
if (message.calculateSize() > mLargestAcceptableMessage) {
|
||||||
Log.d(K9.LOG_TAG, "calculating message size");
|
|
||||||
}
|
|
||||||
close(); // (prevent timeouts while calculating the size)
|
|
||||||
final long calculatedSize = message.calculateSize();
|
|
||||||
if (calculatedSize > mLargestAcceptableMessage) {
|
|
||||||
MessagingException me = new MessagingException("Message too large for server");
|
MessagingException me = new MessagingException("Message too large for server");
|
||||||
me.setPermanentFailure(possibleSend);
|
me.setPermanentFailure(possibleSend);
|
||||||
throw me;
|
throw me;
|
||||||
}
|
}
|
||||||
open(); // (prevent timeouts while calculating the size)
|
|
||||||
if (K9.DEBUG_PROTOCOL_SMTP) {
|
|
||||||
Log.d(K9.LOG_TAG, "calculating message size DONE size=" + calculatedSize + " max allowed=" + mLargestAcceptableMessage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Address[] from = message.getFrom();
|
Address[] from = message.getFrom();
|
||||||
|
Loading…
Reference in New Issue
Block a user