I am in need of a script that will send out emails while going through a NAT. What I have that works is as follows:
Now I have to run this in an environment where the mail server is not in DNS. I therefore have to go through a NAT, 100.100.100.100
How do I add that to my script so that it goes through the IP to send the email?
Moderator's Comments:
code tags please
Last edited by jim mcnamara; 06-12-2012 at 05:24 PM..
Hi
I want to send a mail (to my id like abc@xyz.com) from a shell script running on HP Ux.
Would like to include text from a file or include the file as attachment, either ways.
Thanks
Sidhu (6 Replies)
Please help me in writing the script for sending an attachment through email.(For example my text file name is :abc.txt and it is in directory d:/abc) (1 Reply)
hi guys,
I need a shell script to send mail automatically to my personal mail id like xxxx@hotmail.com but while experimenting with "mail" command I faced following problems.
cat text1.txt | mail -s 'test mail' xxxx@hotmail.com
command successfully executed
but while
checking for... (4 Replies)
hi I need help urgently...i need to write a shell script which can solve the following problem....its urgent plz help me out coz m totally newbie in shell scripting....
the problem is:
Suppose I have a folder called logs. whenever some error occurs some correspondence error file is generated.
I... (4 Replies)
Hi ,
I am trying to create shell script which will help me to compare file name in two folder.
There is a multiple file store in 2 folder.I want to compare that with the name.
If all the file are same then send a mail that "all date is same"
if not then create one log file which contain... (4 Replies)
Hi,
I have shell script which checks the filesystem check but does not send the mail. I might be missing something very simple.. could you please help?
#!/bin/sh
_servers="machine name"
_out="/tmp/output.$$"
_email="me@there.com"
_sub="Disk Space Report $(date)"
_mail=/usr/bin/mail... (5 Replies)
Hello All,
I m trying to send mail from my unix script,
I have used the below command
mailx -s 'hi' email address < temp.txt
It is not giving me any error,but I couldn't receive the mail
Can you please help me.
Many Thanks,
Pragyan (6 Replies)
I have make an menu in which first option is to start and second is to stop the services
echo "Please enter the appropriate choice for doing the operations"
echo "
1) STOP Services
2) START Services
case $choice in
1)
... (1 Reply)
Hello every one.
I use mutt :
"mpack -s "Test" /home/pi/Pictures/2018-10-05_23_10_40.jpg my_email_addres "
to send me a particular picture with the name of the data+jpg in a pictures folder, but this folder I use it for a timelapse proyect with more pictures , and what I need is... (2 Replies)
Discussion started by: maxbcn
2 Replies
LEARN ABOUT SUNOS
create-javamail-resource
asadmin-create-javamail-resource(1AS) User Commands asadmin-create-javamail-resource(1AS)NAME
asadmin-create-javamail-resource, create-javamail-resource - registers the JavaMail resource
SYNOPSIS
create-javamail-resource --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile file-
name] [--terse=false] [--echo=false] [--interactive] --mailhost hostname --mailuser username --fromaddress address [--storeprotocol imap]
[--storeprotocolclass com.sun.mail.imapIMAPStore] [--transprotocol smtp] [--transprotocolclass com.sun.mail.smtp.SMTPTransport]
[--debug=false][--enabled=true] [--description text] [--property (name=value)[:name=value]*] jndi_name
Registers the Javamail resource. This command can only be run remotely.
OPTIONS --user authorized domain application server administrative username.
--password password to administer the domain application server.
--host machine name where the domain application server is running.
--port port number of the domain application server listening for administration requests.
--secure if true, uses SSL/TLS to communicate with the domain application server.
--passwordfile file containing the domain application server password.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script.
--echo setting to true will echo the command line statement on the standard output.
--interactive prompts you for the required options that are not already specified.
--mailhost mail server host.
--mailuser mail account user name.
--fromaddress email address.
--storeprotocol mail server stored protocol.
--storeprotocolclass mail server stored protocol class name.
--transprotocol mail server transport protocol.
--transprotocolclass mail server transport protocol class name.
--debug if set to true, server startsup in debug mode for this resource.
--enabled determines whether the resource is enabled at runtime.
--description text description of the Javamail resource.
--property optional attribute name/value pairs for configuring the Javamail resource.
OPERANDS
jndi_name JNDI name of the Javamail resource to be created.
Example 1: Using create-javamail-resource
asadmin> create-javamail-resource --user admin
--password adminadmin --host fuyako --port 7070 --mailhost localhost
--mailuser sample --fromaddress sample@sun.com mail_resourc/MyMailSession
Command create-javamail-resource executed successfully
Where: mail/MyMailSession is the JavaMail resource created. The escape character () is used in the --fromaddress option to distinguish the
dot (.) and at sign (@). The JNDI name for a JavaMail resource customarily includes the mail/ naming subcontext.
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-delete-javamail-resource(1AS), asadmin-list-javamail-resources(1AS)J2EE 1.4 SDK March 2004 asadmin-create-javamail-resource(1AS)