•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 427,065 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,303 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 59741 | Replies: 14
![]() |
| |
•
•
Join Date: Dec 2004
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
have written a shell script in which I use fastmail to send emails from the shell script.
It sends email to my company account with no problem. But I wan to send the same email to a pager number so that the pager goes off when the particular condition occurs.
I see that email is not being send to the pager from this script.
I tried sending email from my company email account to the pager email and the pager goes of with the email from company email account.
Any idea why this might be happening so? Is there anything else that I should use to send emails to pager
Thanks!
It sends email to my company account with no problem. But I wan to send the same email to a pager number so that the pager goes off when the particular condition occurs.
I see that email is not being send to the pager from this script.
I tried sending email from my company email account to the pager email and the pager goes of with the email from company email account.
Any idea why this might be happening so? Is there anything else that I should use to send emails to pager
Thanks!
•
•
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation:
Rep Power: 11
Solved Threads: 102
What's the script? (be sure to edit out the email addresses)
I usually just use sendmail directly, like this:
sendmail email@domain.com < ~/maildir/mailmessage
and that works out just fine, never had a problem. You could even use a variable if you wanted:
sendmail $email_addy < ~/maildir/mailmessage
That's always worked for me, assuming that your MTA is sendmail, or it is at least available.
I usually just use sendmail directly, like this:
sendmail email@domain.com < ~/maildir/mailmessage
and that works out just fine, never had a problem. You could even use a variable if you wanted:
sendmail $email_addy < ~/maildir/mailmessage
That's always worked for me, assuming that your MTA is sendmail, or it is at least available.
Alex Cavnar, aka alc6379
•
•
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation:
Rep Power: 11
Solved Threads: 102
One command does it all ~ :p
echo "Message Content" | mail -s "Subject goes here" you@domain-name.com
echo "Message Content" | mail -s "Subject goes here" you@domain-name.com
•
•
Join Date: May 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
One command does it all ~ :p
echo "Message Content" | mail -s "Subject goes here" you@domain-name.com
I tried the same but when the mail is send ... The from address is diffirent like <yourlogin@yourmachinename.local>
How to solve this
•
•
Join Date: Jan 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Hi Leoman,
I dont know the solution of this problem and i want a help form you that how to send email from shell script on linux to other email accounts. Can u send me the code at sanju456@rediffmail.com. Sanjeev
I dont know the solution of this problem and i want a help form you that how to send email from shell script on linux to other email accounts. Can u send me the code at sanju456@rediffmail.com. Sanjeev
•
•
Join Date: Apr 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
I have the same problem as Leoman. I am unable to see the solution on the forums.
This is my scenario:
I am trying to send an email to a pager through the shell script on linux. I am able to send an email to an email address from my script as well as from the command line. But, using the same mail command to page myself, fails. Nothing really happens. I don't get paged either from the command line or from my script.
Following is my command :
print "$user, $MESSAGE, $SERVER, `date`" | mail -s "Application $LEVEL PROBLEM" $pager_number
when I replace pager_number with an email address, it works perfectly but when I replace it with a pager number in the format pagernumber@skytel.com , nothing happens.
Can somebody please help ?
Thanks
Deepika
I have the same problem as Leoman. I am unable to see the solution on the forums.
This is my scenario:
I am trying to send an email to a pager through the shell script on linux. I am able to send an email to an email address from my script as well as from the command line. But, using the same mail command to page myself, fails. Nothing really happens. I don't get paged either from the command line or from my script.
Following is my command :
print "$user, $MESSAGE, $SERVER, `date`" | mail -s "Application $LEVEL PROBLEM" $pager_number
when I replace pager_number with an email address, it works perfectly but when I replace it with a pager number in the format pagernumber@skytel.com , nothing happens.
Can somebody please help ?
Thanks
Deepika
•
•
Join Date: Jul 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I have been able to send email from the command line to localhost.localdomain, but when I try to send to my own email account at mindspring.com. it does not deliver to my email inbox. Instaed, I get an error message from mindspring.com that says:
Diagnostic-Code; SMTP: 550 Dynamic IPs/open relays blocked
Contact <openmailrelay@abuse.earthlink.net>
Anybody know a way to get around this and get my message deliverd to my inbox at mindspring.com ?
Thanks
Diagnostic-Code; SMTP: 550 Dynamic IPs/open relays blocked
Contact <openmailrelay@abuse.earthlink.net>
Anybody know a way to get around this and get my message deliverd to my inbox at mindspring.com ?
Thanks
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
advertisment animations browser cell email encryption eu eudora firefox flash gmail google imap interactivity. microsoft mobile mozilla multimedia news onecare open source opinion outlook penelope phishing phones professional research scam scripting security spam spammers spamming stocks technology thunderbird virus web web development webmail
- Change Password In A Shell Script (Shell Scripting)
- Shell script Help (Shell Scripting)
- Using Shell Script how to send mail automatically (Shell Scripting)
- Problem with variables in Windows shell script (Windows NT / 2000 / XP / 2003)
- CDONTS email goes directly to Badmail folder (ASP)
Other Threads in the Shell Scripting Forum
- Previous Thread: Shell Script for yesterday's date.
- Next Thread: Uniq on certain fields



Hybrid Mode