LinHES Forums
http://forum.linhes.org/

How do I email?
http://forum.linhes.org/viewtopic.php?f=5&t=16920
Page 1 of 2

Author:  fra [ Tue Oct 09, 2007 10:52 pm ]
Post subject:  How do I email?

Hi.. I'm embarrassed to ask this question, but it's hard to do a search with the keyword "email"!!!

I'd like to send emails from my account in MythTV! I tried mail, xmail, rmail, pine, etc.. None were known!! Do I have to download one of these, or is there a way to activate one in KM?

Sorry again for the silly question, but I've wasted quite a bit of time trying to guess what the answer may be!!!

Author:  Kirk [ Tue Oct 09, 2007 11:08 pm ]
Post subject: 

Howdy,

What are you specifically looking for with email. A fullblown GUI email client, a simple command line emailer, web-based interface?

Code:
apt-cache search email

will give you a comprehensive list.

squirrelmail & sendemail both install without any dependencies.

Further reading;
http://www.mysettopbox.tv/phpBB2/viewtopic.php?t=1617&start=0&postdays=0&postorder=asc&highlight=

Regards,
Kirk.

Author:  fra [ Tue Oct 09, 2007 11:28 pm ]
Post subject: 

oh just a command line email.

i setup wake up/shutdown using acpi and mythwelcome and want the box to send me an email saying it is shutting down and will wake up at "this" time.

so something like
mail -s "MythTV shutting down.. Back at $time" username@domain.edu
would work for me!!!

And thanks for the quick reply!!!!!

Author:  fra [ Tue Oct 09, 2007 11:30 pm ]
Post subject: 

Kirk wrote:


for some reason the link sends me to the Forum Index!!!

Author:  Kirk [ Tue Oct 09, 2007 11:46 pm ]
Post subject: 

fra wrote:
Kirk wrote:


for some reason the link sends me to the Forum Index!!!


Strange, edited, try now.

Sendemail is probably a quick easy route then.

Code:
apt-get install sendemail
man sendEmail

Author:  fra [ Wed Oct 10, 2007 12:08 am ]
Post subject: 

thanks! problem solved :)
good night!!!! :) (or good morning! i guess)

Author:  Too Many Secrets [ Tue Oct 16, 2007 12:38 pm ]
Post subject: 

I'd like to email too. Did you get sendemail working ok?

Author:  auttila [ Tue Oct 16, 2007 9:57 pm ]
Post subject: 

The sendEmail Perl script seems to be working fine for me, it is especially nice because I don't have to install SMTP server to my KM box.

I use it to send my drive's S.M.A.R.T. status to my cell phone every morning. I also have plans on sending parts of TV listings for me.

Author:  fra [ Wed Oct 17, 2007 2:02 pm ]
Post subject: 

Too Many Secrets wrote:
I'd like to email too. Did you get sendemail working ok?


yes. just as instructed! (read the man for how to use it)
i'm at work for now, but i can look up the format i use to send emails a bit later, if you want. let me know if you still need it!

Author:  khrusher [ Thu Oct 18, 2007 11:19 am ]
Post subject: 

sendemail installed and runs perfectly! i bounce securely off of an authenticated gmail account.

Thanks for the pointer

Author:  grante [ Thu Oct 18, 2007 3:18 pm ]
Post subject: 

auttila wrote:
The sendEmail Perl script seems to be working fine for me, it
is especially nice because I don't have to install SMTP server
to my KM box.

You shouldn't need an SMTP server on your LM box regardless
unless you also want to receive inbound mail. To send mail you
need an SMTP client (which I presume is what sendEmail is).
Another dead-simple SMTP client that I used is ssmtp. It would
allow you to use any of the sendmail-compatible command-line
clients like mailx or mutt.

Author:  Too Many Secrets [ Mon Oct 22, 2007 10:16 am ]
Post subject: 

fra wrote:
Too Many Secrets wrote:
I'd like to email too. Did you get sendemail working ok?


yes. just as instructed! (read the man for how to use it)
i'm at work for now, but i can look up the format i use to send emails a bit later, if you want. let me know if you still need it!


I'm trying to get this working and I must be missing something. I've read thru the man page and this thread. Can you post an example? I must be missing something real basic.

Edit: OK I got it! For those that follow and might need a bit of help I'm posting my working example.

Code:
sendEmail -s smtp.host:25 -u "Subject of email" -f sender@yahoo.com -t reciever@yahoo.com -o message-file={html_file}

Author:  khrusher [ Tue Oct 23, 2007 1:20 pm ]
Post subject: 

here is a gmail specific command line that passes authentication bits.

1) first you need a free gmail account.

2) here is the command
Code:
sendEmail -f <from_address> -s smtp.gmail.com:587 -xu <gmail_address> -xp <gmail_password> -t <to_address> -u "subject" -m "message text"


Note:

The 'from_address' can be anything, it will will be used if the the user replies. it does not need to be an address on your myth box, or a gmail account.

Side note, this is an easy way to spoof an address to those that are not very tech savy.

Author:  Too Many Secrets [ Thu Oct 25, 2007 8:06 am ]
Post subject: 

Strangely I can run the above sendEmail script to send email as user mythtv but not as root. I also have not been able to use the script to generate an email via crontab. Neither users mythtv or root will send the email from cron. Seems to be a permissions problems but I can't see where. Here's what it kicks when I run as root:

Code:
bash: /usr/local/bin/sendEmail: /usr/lib/perl: bad interpreter: Permission denied

Author:  khrusher [ Thu Oct 25, 2007 1:47 pm ]
Post subject: 

for the Cron bits.....

Remember that cron entries do not run in the same environment as your login shell. If you are expecting a environment var to be set, you need to set it yourself. One such var that often is assumed is the PATH.

You didnt supply your crontab entry, but I wonder if you included /usr/local/bin/ in the statement, if not, cron prbably cant find sendEmail.

To check for errors in a cron job, you need to capture stdout and stderr.

Code:
0 * * * * /usr/local/bin/sendEmail (otherparms) > /tmp/cron.out 2> /tmp/cron.err

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/