Sendmail function


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sendmail function
# 1  
Old 04-09-2014
Sendmail function

Hi ,

The default mail/mailx function is not supporting HTML/ Headers. But sendmail does. Can anyone of you please guide me in creating function like

1. Sending HTML Emails.


Code:
FN_SEND_EMAIL "$MAIL_BODY" "HTML"
$MAIL_BODY="<html><table><tr><td>Just</td><td>testing</td></tr></table>"

And it will send the email with that HTML Body.

2. Sending text email

Code:
FN_SEND_EMAIL "$MAIL_BODY"

and it will send normal email .

Thanks in advance.

Last edited by Anupam_Halder; 04-09-2014 at 05:05 AM..
# 2  
Old 04-13-2014
Look here.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Function - Make your function return an exit status

Hi All, Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition. #Body function1() { if then echo "exist" else echo "not exist" } #if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies

2. Shell Programming and Scripting

Need help on awk for printing the function name inside each function

Hi, I am having script which contains many functions. Need to print each function name at the starting of the function. Like below, functionname() { echo "functionname" commands.... } I've tried like below, func=`grep "()" scriptname | cut -d "(" -f1` for i in $func do nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies

3. Shell Programming and Scripting

Will files, creaetd in one function of the same script will be recognized in another function?

Dear All. I have a script, which process files one by one. In the script I have two functions. one sftp files to different server the other from existing file create file with different name. My question is: Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies

4. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

5. Shell Programming and Scripting

Help to Modify File Name in each function before calling another function.

I have a script which does gunzip, zip and untar. Input to the script is file name and file directory (where file is located) I am reading the input parameters as follows: FILENAME=$1 FILEDIR=$2 I have created 3 functions that are as follows: 1) gunzip file 2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies

6. UNIX for Advanced & Expert Users

Sendmail questions, SCO 5.0.6 sendmail 8.11.0

I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back. (reason: 530 5.7.1 Authentication required) 530 5.7.1 Authentication required Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies

7. Shell Programming and Scripting

SendMail Function Failure

Hi All, Background: We use SendMail function (given below) to send emails to users. The email address are obtained as ouptut of a stored procedure in sybase. We have defined a SendMail function as below in a .pm file and it is used in a .pl script. Code Snippet: sub SendMail { ... (1 Reply)
Discussion started by: vigdmab
1 Replies

8. Shell Programming and Scripting

SHELL SCRIPT Function Calling Another Function Please Help...

This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord but only one record is getting wrote in DB.... Please advise ASAP...:confused: function InsertFtg { FTGSTR="" echo "Saurabh is GREAT $#" let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies

9. Shell Programming and Scripting

Passing global variable to a function which is called by another function

Hi , I have three funcions f1, f2 and f3 . f1 calls f2 and f2 calls f3 . I have a global variable "period" which i want to pass to f3 . Can i pass the variable directly in the definition of f3 ? Pls help . sars (4 Replies)
Discussion started by: sars
4 Replies

10. Shell Programming and Scripting

sendmail function

Hi all, Following is the code for sending mail with attachment #! /bin/ksh SUBJ="Send mail from Unix PHDCAP12 " TO=tmp@rediff.com CC=tmp1@rediff.com ( cat << ! To : ${TO} Subject : ${SUBJ} Cc : ${CC} ! cat << ! HOPE THIS WORKS Test123 This sample E-mail message with the Unix... (1 Reply)
Discussion started by: radhika03
1 Replies
Login or Register to Ask a Question