SAIC-ATS / ExperimentalMedia2013

A repository for Experimental Media in Art and Technology Studies at SAIC.
MIT License
22 stars 21 forks source link

Setting up postfix so you can email via gmail from terminal (**not directly related to class work so feel free to ignore) #61

Open abrahamavnisan opened 11 years ago

abrahamavnisan commented 11 years ago

Hey guys,

This is not directly related to what we've been working on in class, but I thought I'd post my issue here anyway as people might find this useful for projects down the line.

I became interested tonight in writing some bash scripts that could send email - particularly email through a gmail account. You can send email over terminal using the mail command, but as it turns out, it's pretty complicated.

I spent quite a few hours on it tonight and finally had to give up. I was using this tutorial along with a few others, but couldn't get past this error message (which you can access with tail -f /var/log/mail.log in terminal):

4E6A425EB49: to=<abraham.avnisan@gmail.com>, relay=none, delay=7526, delays=7466/0.05/60/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[2607:f8b0:4002:c04::6d]:587: No route to host)

If anybody has any ideas, let me know. If not, don't worry about it. If you want to set this up on your system in the future and I ever get it working, ask me for help!

Happy Friday.

bakercp commented 11 years ago

This addon for openFrameworks that I wrote works really well for that ... :)

https://github.com/bakercp/ofxSMTP

abrahamavnisan commented 11 years ago

unbelievable! if only I had asked you first :) Thanks for this! Will give it a whirl and see what I can do...

bakercp commented 11 years ago

It's not an ideal command line solution, but ... you could just use open frameworks :)

What are you trying to do (big picture)?

bakercp commented 11 years ago

Also, you probably figured it out, but you can clone the addon into your addons folder and then you should be able to run the example.

abrahamavnisan commented 11 years ago

Big picture is trying to make communication with my students (I teach technical writing online) more efficient, and using that as an excuse to get better at bash (or maybe now...openframeworks!) I can give you a more in depth big picture at some point down the road...

I'm having all sorts of ugly things happen when I try to run the example. I downloaded the zip, unzipped it, and placed the addon into the folder with the other addons. I'm getting this sort of thing (see attached image). Is the addon compatible with the version of oF we are running in class? It should be, right? screen shot 2013-09-27 at 10 23 50 pm

bakercp commented 11 years ago

Just ran across this:

http://msmtp.sourceforge.net/index.html

An easy way to install it would be

install homebrew (from http://brew.sh/)

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Then

brew install msmtp

Then you'll need to make a configuration file but you should be able to use msmtp form the command line.

abrahamavnisan commented 11 years ago

Awesome - thanks!! Will explore further this weekend and keep you posted.

From what I can glean, this is an alternative to your oF addon. I guess the advantage would be that I could then do stuff in bash? And / or might be able to get it up and running where I'm running into trouble with the addon (this is my first time trying to use an oF addon, so it might be something silly / something I'll be able to fix with fresh eyes.

Time to go home and go to bed now :)

bakercp commented 11 years ago

Is this resolved?

abrahamavnisan commented 11 years ago

No, because I haven't had any time to deal with it. It's not urgent - why don't you mark it as resolved and I'll open it back up if needed?

Abraham Avnisan

abraham.avnisan@gmail.com

http://www.facebook.com/l.php?u=http%3A%2F%2Fabrahamavnisan.com%2F&h=FAQF6JJ_0&s=1 http://abrahamavnisan.com

find me on Facebook http://facebook.com/abraham.avnisan

find me on Google+ https://plus.google.com/100878825292158943884

follow me on Twitter http://twitter.com/AbrahamAvnisan

follow me on Instagram http://instagram.com/abrahamavnisan

On Mon, Sep 30, 2013 at 7:32 PM, Christopher Baker <notifications@github.com

wrote:

Is this resolved?

— Reply to this email directly or view it on GitHubhttps://github.com/bakercp/ExperimentalMedia/issues/61#issuecomment-25418026 .