diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index 2f23f896e7..4d4f66eab1 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -887,7 +887,12 @@ class DeviceMixin(object): # {{{ on_card = dest self.sync_to_device(on_card, delete, fmt) elif dest == 'mail': - to, fmts, subject = sub_dest.split(';') + sub_dest_parts = sub_dest.split(';') + while len(sub_dest_parts) < 3: + sub_dest_parts.append('') + to = sub_dest_parts[0] + fmts = sub_dest_parts[1] + subject = ';'.join(sub_dest_parts[2:]) fmts = [x.strip().lower() for x in fmts.split(',')] self.send_by_mail(to, fmts, delete, subject=subject)