Error in JavaMail : PKIX path building failed unable to find valid certification path to requested target
Ok problem solved! The solution is this: First get the self-signed certificate from the mail server via openssl: echo | openssl s_client -connect yoursever:port 2>&1 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ > yourcert.pem Then save the yourcert.pem file into this path /Library/Java/Home/lib/security (on macOSX) and put the cert file into the cacerts like this keytool … Read more
Getting mail attachment to python file object
I don’t really understand what you mean by “email multipart message object”. Do you mean an object belonging to the email.message.Message class? If that is what you mean, it’s straightforward. On a multipart message, the get_payload method returns a list of message parts (each of which is itself a Message object). You can iterate over … Read more
Check unread count of Gmail messages with Python
import imaplib obj = imaplib.IMAP4_SSL(‘imap.gmail.com’,’993′) obj.login(‘username’,’password’) obj.select() obj.search(None,’UnSeen’)
No attribute ‘SMTP’, error when trying to send email in Python
Python already has an email module. Your script’s name is email.py, which is preventing smtplib from importing the built-in email module. Rename your script to something other than email.py and the problem will go away.
Is there a webservice or API to help me read email contacts?
Found this API http://code.google.com/p/socialauth-net/ and seams good, will test it and write here later the result.