Skip to content

Commit

Permalink
Saves as EML: Default name when no one is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Casanovas committed Sep 20, 2019
1 parent ff50a30 commit e69110a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions O365/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def save_as_eml(self, attachment, to_path=None):
raise ValueError('Must provide a saved "item" attachment of type MessageAttachment')

if to_path is None:
to_path = Path()
to_path = Path('message_eml.eml')
else:
if not isinstance(to_path, Path):
to_path = Path(to_path)
Expand Down Expand Up @@ -1022,7 +1022,7 @@ def save_as_eml(self, to_path=None):
"""

if to_path is None:
to_path = Path()
to_path = Path('message_eml.eml')
else:
if not isinstance(to_path, Path):
to_path = Path(to_path)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ Messages and attached messages can be saved as *.eml.

```python
msg_attachment = msg.attachments[0] # the first attachment is attachment.attachment_type == 'item' and I know it's a message.
mg.attachments.save_as_eml(msg_attachment, to_path=Path('my_saved_email.eml'))
msg.attachments.save_as_eml(msg_attachment, to_path=Path('my_saved_email.eml'))
```

## AddressBook
Expand Down

0 comments on commit e69110a

Please sign in to comment.