0

I want to implement an Email client using python smtp library. but I don't know:
1. how to run python code in cocoa? like

s = smtplib.SMTP()   
s.connect("mail.yourdomain.com") 
s.login(username, password) #login if needed 
s.sendmail(mailfrom, mailto, mailbody)  
s.quit()  

2. can cocoa can get the error message from python smtp library?

1 Answer 1

1

Put the Python code into its own little program and use NSTask to run it.

Growl's MailMe display does exactly this, for the very same purpose. It uses my simple-mailer tool.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.