I have a script that send email using sendEmail (CentOS shell)
script is:
So far this works fine.
Now i create a ConfigFile as follows:
and Now I modify my script as follow:
I get following error:
Now I'm unable to understand that why I'm getting this error. even when i try to echo Values it shows me correct values. Also when i run same command from command prompt it sends email...then where I'm doing wrong.? Please help. thanks.
There should be double quotes around the variable references..
Also, a command cannot be spread over two lines like that.
I do not think the quotes in the config file are necessary, since with
$VALUE sweeps up everything to the right of the =-sign
There are a couple of questions I would have are, like why are the values being put in a numbered array, why is a loop being used, why do spaces need to be removed from $VAR and what is the benefit of creating a config file format like that, in which only the information needed for a single email can be stored.
--
As a side note: the specified shell on line 1 does not match the syntax in the script, which is bash or ksh93. CentOS shell is not the name of a shell.
1. I also tried using "". but I got same issue.
2. Command is not spread over 2 line. in CentOS it is just one line.
3. I tried using without array, loop and values (as given below) but again no success.
4. I also tried bash but same result.
5. Config file is created as this program will be used by different resources so every1 can adjust parameters without opening source file. Also there are other tasks too that are using config file so one place is better for this kind of information.
Hi everyone,
I try to send an email with "sendemail", I created four variables for do cleaner but it doesn't work :( below :
#!/bin/bash
sender=$(X@x.com)
recipient=$(x@x.com)
subject=$(Files Copy)
server=$(x.x.x.x)
/usr/bin/sendemail -f $sender -t $recipient -u $subject -m blablabla... (2 Replies)
Hi Guys,
I am trying to send email from solaris server using sendemail utility. I want to send multi content email. For example, i want to send email body with html file and a attachment of txt file. I using below code but the html not render correctly in email body.
(
echo "To:... (2 Replies)
Hello,
I installed the sendemail program for commandline/script outgoing mail. It works great. I was wondering if there is some simple program to receive mail. Something like the sendemail program...
Grtz (5 Replies)
hi Team,
i need a help in perl ,
i need to get values(10 rows +) from perl GUI and insert those values into oracle table.
am trying to achive this in Perl array, can you please help me on this.
thanks
senthil (1 Reply)
Hello,
I would like to send email message to my mail list.
I have been running linux based server and I submitted this process manually up to now.
I would like to send each individual with a shell script.
In ssh panel, I tested below command and it works smoothly.
sendEmail -t... (1 Reply)
Hello
I need your kind help for configuring email on Solaris 10 so I can send reports from the system to my management and my colleagues.
I have the IP address of the email server of my company and the port 2525. I went through many documents online with no luck.
Can any one help me... (4 Replies)
Dear all,
I have following set of code which I want to modify
In the given code, the given PATH535 only accept the single path.
I would like to modify it to make it array and should be able to pass several
of the path address together.
for example like following:
PATH535=/pathA/log/A/... (5 Replies)