I have been trying to get launchd working with rss2email for the last few days with no luck. I think I am close, but no cigar yet. Here is what I have managed so far.
1) created this plist file, com.macattack.r2e.plist, in ~/Library/LaunchAgents
2) Created an sh script, r2e.sh, located in ~/rss2email as shown below:
3) Installed rss2email and made sure it works from running in terminal both "./r2e run" and "./r2e.sh". Both work well and send the feeds to my email address.
4) I added the rss2email folder to .bash_profile to look like this:
5) When I type "echo $PATH" the output is:
6) When I look in Console, this is the output I get:
Yet, when I run "./r2e run" or "./r2e.sh", it emails just fine and there is no problem with the smtp server authenticating. I have come a long way and learned a lot. I feel like I am close but I just can't seem to get it working correctly. I am a complete noob at this and I have just been piecing together what I can find on the forums. I was not able to get the r2e to run directly in the plist file. I tried many different ways. That is why I created the script file. Any help will be greatly appreciated. Thanks in advance.
1) created this plist file, com.macattack.r2e.plist, in ~/Library/LaunchAgents
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.macattack.r2e</string>
<key>ProgramArguments</key>
<array>
<string>/Users/macattack/rss2email/r2e.sh</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>StartInterval</key>
<integer>1800</integer>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.macattack.r2e</string>
<key>ProgramArguments</key>
<array>
<string>/Users/macattack/rss2email/r2e.sh</string>
</array>
<key>Nice</key>
<integer>1</integer>
<key>StartInterval</key>
<integer>1800</integer>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
2) Created an sh script, r2e.sh, located in ~/rss2email as shown below:
cd /Users/macattack/rss2email/ ; ./r2e run
3) Installed rss2email and made sure it works from running in terminal both "./r2e run" and "./r2e.sh". Both work well and send the feeds to my email address.
4) I added the rss2email folder to .bash_profile to look like this:
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/macattack/rss2email:${PATH}"
export PATH
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/macattack/rss2email:${PATH}"
export PATH
5) When I type "echo $PATH" the output is:
/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/macattack/rss2email:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
6) When I look in Console, this is the output I get:
8/22/11 1:01:38 AM com.macattack.r2e[541] I: Processing [2] "index.rss"
8/22/11 1:01:46 AM com.macattack.r2e[541] Fatal error: could not authenticate with mail server "smtp.gmail.com:465" as user "email@address"
8/22/11 1:01:46 AM com.macattack.r2e[541] Check your config.py file to confirm that SMTP_SERVER and other mail server settings are configured properly
8/22/11 1:01:46 AM com.apple.launchd.peruser.502[183] (com.macattack.r2e[541]) Exited with exit code: 1
8/22/11 1:01:46 AM com.macattack.r2e[541] Fatal error: could not authenticate with mail server "smtp.gmail.com:465" as user "email@address"
8/22/11 1:01:46 AM com.macattack.r2e[541] Check your config.py file to confirm that SMTP_SERVER and other mail server settings are configured properly
8/22/11 1:01:46 AM com.apple.launchd.peruser.502[183] (com.macattack.r2e[541]) Exited with exit code: 1
Yet, when I run "./r2e run" or "./r2e.sh", it emails just fine and there is no problem with the smtp server authenticating. I have come a long way and learned a lot. I feel like I am close but I just can't seem to get it working correctly. I am a complete noob at this and I have just been piecing together what I can find on the forums. I was not able to get the r2e to run directly in the plist file. I tried many different ways. That is why I created the script file. Any help will be greatly appreciated. Thanks in advance.
Last edited: