03-06-2008
telnet smtp and email in batch
I can do the following steps on my UNIX box interactively, but cannot send an email with a script. Can someone help? I need to send an email or some other notification when a cron job fails.
telnet xx.yy.zz.ww 25
helo
mail from:
123@123.com
rcpt to:
my@email.net
data
subject: email test
the dog
is in
the house
.
quit
Any other suggestions to solve my failed cron message problem.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi. I have a Tru64 Unix V5.1 server that I would like to send emails using an exchange server we have on the same network as the smtp of this machine. What are the requirements/configuration that I need to do in order to make this possible. We are planning on emailing error messages and such from... (2 Replies)
Discussion started by: fidodido
2 Replies
2. UNIX for Dummies Questions & Answers
hi
how can i connect to a telnet session using the unix script...
need to create a batch file which has to run daily.
first it has to telnet to a IP then execute certain commands and log the session.
thanks
Aemu (1 Reply)
Discussion started by: aemunathan
1 Replies
3. Shell Programming and Scripting
Hi,
I have a mysql backup script located in crontab. I need to inform system administrator if the backup fail by telnet to smtp to send failure notification. ANyone got clue on how to achieve that?
cheers. (4 Replies)
Discussion started by: bulkbiz
4 Replies
4. Shell Programming and Scripting
Hi,
I am trying to write a ksh script to send an attachment via telnet to an SMTP server.
I'm using MKS Toolkit. mail, mailx, sendmail, nc are not working on the server where I have MKS Toolkit installed.
If I type the following from the command prompt I receive an email:
telnet x.com... (0 Replies)
Discussion started by: dukeEarth
0 Replies
5. UNIX for Dummies Questions & Answers
My distribution details.
# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description: Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
Release: 5.2
Codename: ... (13 Replies)
Discussion started by: pinga123
13 Replies
6. AIX
Please help, i can not to send email from AIX 6.1 to outside network through STMP - Exchange. Any one can help ? (1 Reply)
Discussion started by: ichsan
1 Replies
7. UNIX and Linux Applications
Background:
I am replicating a set of servers into a "bubble" for testing. Those systems cannot be aware they are in a "bubble" so I must replicate all external services. I have successfully replicated most of those services except SMTP. I would like to configure an SMTP server that collects... (0 Replies)
Discussion started by: NFN_NLN
0 Replies
8. UNIX for Dummies Questions & Answers
My batch files run every day, it moves files from servers to my local computer, can I have a confirmation email sent to me from this batch file saying if the job failed or successes? Thank you for your help! (6 Replies)
Discussion started by: idiazza
6 Replies
9. AIX
hi,
i have a problem ,
I'm creating a script that send a mail with telnet .
via command line it's ok,but i create the .sh i have problem .
this a .sh
telnet
open mysmtp 25
HELO
sleep 15
MAIL FROM:<Email>
sleep 15
RCPT TO:<email>
sleep 15
DATA
SUBJECT : PROVA (3 Replies)
Discussion started by: cescofran76
3 Replies
LEARN ABOUT HPUX
icapnotify
icapnotify(1M) icapnotify(1M)
NAME
icapnotify - Test email connectivity to HP for Instant Capacity (iCAP) systems. Request a confirmation response email from HP. Turn config-
uration change notification and asset reporting on or off.
SYNOPSIS
icapnotify <reply_address>
icapnotify -a on|off
icapnotify -n on|off
Obsolescent:
icod_notify <reply_address>
icod_notify -a on|off
icod_notify -n on|off
DESCRIPTION
When a reply_address is specified, sends an asset report via email to HP, root, and the specified email address. Confirmation email is
sent from HP to the specified reply email address indicating that HP received the asset report email.
Note that asset reporting is optional but can be useful for viewing complexwide asset information at the HP Utility Pricing Solutions por-
tal (http://www.hp.com/go/icap/portal).
The deprecated command provides identical functionality to the command and is maintained for backward compatibility.
For detailed information on email configuration and requirements, see the located at /usr/share/doc/icapUserGuide.pdf.
Options
The command recognizes these options and arguments:
-a on|off Turns email asset reporting on or off. This option is used to specify if the Instant Capacity software should send asset
reports to HP via email. The command displays the present setting for this option.
-n on|off Turns configuration change notification on or off. If specified on, executing the command results in a configuration
change notification email sent to the system contact email address summarizing any configuration change. Configuration
change notification email can be turned off by specifying off. Configuration change notifications are not sent if the
system contact email address is not set.
EXTERNAL INFLUENCES
Environment Variables
o LANG determines the locale to use for the locale categories when both LC_ALL and the corresponding environment variable (begin-
ning with LC_) do not specify a locale. If LANG is not set or is set to the empty string, a default of C is used (see lang(5)).
o LC_CTYPE determines the interpretation of single- and multiple-byte characters.
o LC_MESSAGES determines the language in which messages are displayed.
If any internationalization variable contains an invalid setting, icapnotify behaves as if all internationalization variables are
set to C (see environ(5)).
International Code Set Support
Single- and multiple-byte character code sets are supported.
RETURN VALUE
The command exits with one of these values:
0 Command succeeded.
>0 Command failed; error message sent to STDERR.
EXAMPLES
Test email connectivity with HP by sending an asset report to HP, root , and super_user@corp.com, and request a confirmation email from HP
to be sent to super_user@corp.com:
icapnotify super_user@corp.com
Turn email asset reporting on:
icapnotify -a on
Turn email asset reporting off:
icapnotify -a off
Turn configuration change notification on:
icapnotify -n on
Turn configuration change notification off:
icapnotify -n off
AUTHOR
was developed by HP.
SEE ALSO
icapmodify(1M), icapstatus(1M), icapmanage(1M), icapd(1M), icap(5).
icapnotify(1M)