1753787 Members
7683 Online
108799 Solutions
New Discussion юеВ

Re: mailx, sendmail html

 
SOLVED
Go to solution
Roderick Derks
Frequent Advisor

Re: mailx, sendmail html

I used the ideas in the script Steven Protter added and it works ok except for the Cc: and Bcc: Mails to these addresses are not send.

# create mail
echo "To: $EMAIL_TO" > ${tmpmail}
echo "From: $EMAIL_FROM" >> ${tmpmail}
echo "Cc: ${EMAIL_CC} ${EMAIL_BCC}" >> ${tmpmail}
echo "Bcc: $EMAIL_BCC" >> ${tmpmail}
echo "Subject: $EMAIL_SUBJECT" >> ${tmpmail}

Anyone got an idea?
Sandman!
Honored Contributor

Re: mailx, sendmail html

Jason,

Create a file .mailrc in your $HOME directory and add the following variables (recognized by mailx) to it...

set charset=us-ascii
set encoding=8bit

...then mailx your html file in the body of the message.

hope it helps!
Roderick Derks
Frequent Advisor

Re: mailx, sendmail html

Hello Jason,

I'm using "sendmail -t" to send the emails.

echo "To: $EMAIL_TO" > ${tmpmail}
echo "From: $EMAIL_FROM" >> ${tmpmail}
echo "Cc: ${EMAIL_CC} >> ${tmpmail}
echo "Bcc: $EMAIL_BCC" >> ${tmpmail}
echo "Subject: $EMAIL_SUBJECT" >> ${tmpmail}

uuencode ${tmpbody} ${tmpbody} >> ${tmpmail}
cat ${tmpmail}| sendmail -t

Mail is received by the "To:" address, subject and body are OK. Only problem is that the "Cc:" (and "Bcc:") don't receive an email. I can't find the problem.
Roderick Derks
Frequent Advisor

Re: mailx, sendmail html

Pfff. It works. It didn't work last friday. Now the mails are being received by everone. Hmmm. Thanks for helping.
jason thompson_1
Frequent Advisor

Re: mailx, sendmail html

Thanks for the help
What's that smell?