GMAIL Only
If you want to do this with gmail
only (not mailto as the comments have suggested), the easiest way to do this is to use this answer.
This reads:
https://mail.google.com/mail/?view=cm&fs=1&to=someone@example.com&su=SUBJECT&body=BODY&bcc=someone.else@example.com
So if you just wanted to do one for your own code you could do:
wb.open("https://mail.google.com/mail/?view=cm&fs=1&to=me@example.com&su=Bug%20Report")
The %20
is what a URL uses in place of a space. You could also quite easily add substitution with f-strings
to add information such as the date and time when the error occured.
Mailto (as suggested by comments)
People have also suggested using mailto
, for example you could write:
wb.open("mailto://me@example.com")
The problem with using mailto
as browsers like firefox on both ubuntu and windows open software solutions to sending Emails, whether this be Windows 10 Mail or Thunderbird and users may not have these setup and so would simply open a program. For example, on my system because my Windows 10 is bound to my work account, if I get a mailto link it opens up a work email (which is something I would hesitate to use for a community project)