Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When setting body of email it duplicates the body #417

Open
TheShepherdPython opened this issue Apr 2, 2020 · 1 comment
Open

When setting body of email it duplicates the body #417

TheShepherdPython opened this issue Apr 2, 2020 · 1 comment

Comments

@TheShepherdPython
Copy link

Hi,

When I go to set the body of an email it doesnt actually overwrite the body it just adds onto the body, I cannot find a way to completely replace the body so believe that this is a bug, below is an example code and an example result. If I am wrong can you please guide me on how to replace the body? Thank you

m = account.new_message()
m.to.add('######')
m.subject = message_fwd_subject
m.body = 'test'
m.body = 'test'
m.send()

The result of the above is:

test

test

When I expect it to just be:

test

@alejcas
Copy link
Member

alejcas commented Apr 2, 2020

This is intended so you can reply emails without losing the body content.

To replace the body set it to None first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants