Skip to content

Sending text & html email content in body #779

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

Open
tukutela opened this issue May 12, 2022 · 6 comments
Open

Sending text & html email content in body #779

tukutela opened this issue May 12, 2022 · 6 comments

Comments

@tukutela
Copy link

Hi all,

Wondering if anyone has sent both the text AND html versions of an email using message.send(). It would appear in the docs MimeMessages that you can, however can't see where we could in the library.

Any ideas would be much appreciated, thanks.

@alejcas
Copy link
Member

alejcas commented May 26, 2022

Not implemented as far as I know.

@RogerSelwyn
Copy link
Contributor

Looks like you'd have to encode the body as mime rather than json - https://learn.microsoft.com/en-us/graph/api/user-post-messages?view=graph-rest-1.0&tabs=http#request-body

@alejcas
Copy link
Member

alejcas commented Apr 22, 2025

Looks like you'd have to encode the body as mime rather than json - https://learn.microsoft.com/en-us/graph/api/user-post-messages?view=graph-rest-1.0&tabs=http#request-body

Yes but O365 should do it for you if you provide a text and html with different content (which is not possible right now with O365).
This needs some changes to be possible.

@RogerSelwyn
Copy link
Contributor

I agree. I have a tendency to write my thoughts as a reminder for when coming back to it later. I'll look to create a PR on it at some point.

Do we always want to send a mime encoded body, or make it optional?

@alejcas
Copy link
Member

alejcas commented Apr 22, 2025

Do we always want to send a mime encoded body, or make it optional?

I think it should be optional.
I'm not sure if MIME should be the default, as I'm not familiar with email standards.

@RogerSelwyn
Copy link
Contributor

I think it should be optional. I'm not sure if MIME should be the default, as I'm not familiar with email standards.

I'll do some research

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

No branches or pull requests

3 participants