-
Notifications
You must be signed in to change notification settings - Fork 5
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
Can't send message (KeyError) #4
Comments
Hello, at the moment it is not possible to send a message to address @proton.me/@protonmail.com because this requires additional encryption. |
@opulentfox-29 tried again sending email to a gmail.com address. now i dont get any error, and i get a Message object back. but no message is sent? I checked both proton and gmail accounts, there's nothing sent. |
I can’t know why this happened, if the code worked without errors, then the letter should have been sent, maybe you changed your account settings? my code: from protonmail import ProtonMail
username = "...@proton.me"
password = "..."
proton = ProtonMail()
proton.login(username, password)
private_key = '...@proton.me-....asc'
passphrase = '...'
proton.pgp_import(private_key, passphrase=passphrase)
recipients = ["...@gmail.com", "...@bustayes.com"]
subject = "My first message"
body = "Ciao!" # html or just text
new_message = proton.create_message(
recipients=recipients,
subject=subject,
body=body
)
sent_message = proton.send_message(new_message) |
Is there a way to send the message without the signature attached? |
This will now be the default. |
@stefanodvx maybe there was a problem with the private key, in the new version 1.4.0 all keys are received automatically, try sending a message now to gmail.com Install
Usefrom protonmail import ProtonMail
username = "YouAddress@proton.me"
password = "YourPassword123"
proton = ProtonMail()
proton.login(username, password)
recipients = ["to@gmail.com"]
subject = "My first message"
body = "<html><body>hello, i sent my first mail!</body></html>"
new_message = proton.create_message(
recipients=recipients,
subject=subject,
body=body
)
sent_message = proton.send_message(new_message) also do not forget that gmail can identify all letters from protonmail as spam\scam, check your spam folder. and all the messages you sent in protonmail are not in the “inbox” folder, but in the "sent" folder or in the "all mail" folder |
works. ty. |
HI! I'm trying to send a message... This is my current code (without the login part)
...and this is the error i get
The text was updated successfully, but these errors were encountered: