equal
deleted
inserted
replaced
365 msg = p.parsestr(encoding.strfromlocal(data)) |
365 msg = p.parsestr(encoding.strfromlocal(data)) |
366 except emailerrors.MessageParseError as inst: |
366 except emailerrors.MessageParseError as inst: |
367 raise error.Abort(inst) |
367 raise error.Abort(inst) |
368 |
368 |
369 # store sender and subject |
369 # store sender and subject |
370 sender = encoding.strtolocal(msg[r'From']) |
370 sender = msg[r'From'] |
371 subject = encoding.strtolocal(msg[r'Subject']) |
371 subject = msg[r'Subject'] |
|
372 if sender is not None: |
|
373 sender = encoding.strtolocal(sender) |
|
374 if subject is not None: |
|
375 subject = encoding.strtolocal(subject) |
372 del msg[r'From'], msg[r'Subject'] |
376 del msg[r'From'], msg[r'Subject'] |
373 |
377 |
374 if not msg.is_multipart(): |
378 if not msg.is_multipart(): |
375 # create fresh mime message from scratch |
379 # create fresh mime message from scratch |
376 # (multipart templates must take care of this themselves) |
380 # (multipart templates must take care of this themselves) |