LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-11-2012, 03:31 PM   #1
joe98888
LQ Newbie
 
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
Question Weird truncating of HTML in SENDMAIL script


Greetings! I wrote a script to send email with attachment using SENDMAIL. I'm using

MAILTEXT=/tmp/t_tmp.$$

and echoing everything I need included in the body of the email. It's HTML-- "Content-Type: multipart/mixed;

The script executes and the email is received but seeing weird truncation.

This EXCERPT from script...
</style></head>
<body lang=EN-US link=blue vlink=purple>
<p class=MsoNormal>Please find the attached overhead summary report for period $periodYY.</p>" >> ${MAILTEXT}

BECOMES this in source of email received...
</style></head>
<body lang=-US link=ue vlink=rple>
<p class=oNormal>Please find the attached overhead summary report for period Test Sub.</p>

It appears the finished output is dropping the first two characters following any equal signs in the HTML... link=blue becomse link=ue, MsoNormal becomes oNormal, etc. ??

Any ideas why this is occurring?

Last edited by joe98888; 06-11-2012 at 03:33 PM. Reason: Clarity
 
Old 06-12-2012, 08:10 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
probably a filter?
 
Old 06-12-2012, 09:49 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
HTML email

1. I am less than sympathetic because I HATE HTML in email.
2. Does your script construct the text as stings and push it directly, or build a file and pipe it?
3. Are you using the sendmail agent directly instead of one of the programs that manages the interface for you? (Mutt, mail, mailx, elm, pine, etc: they all have ways to run automated for scripting and filter/send intelligently, even use attachments).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Truncating Script blu_alchemist Linux - Software 4 09-13-2007 06:40 PM
shell script - truncating filenames mr_scary Programming 3 09-04-2006 02:50 PM
help!! sendmail html MIME handling skyflakes690 Linux - General 0 05-16-2006 03:30 AM
HTML / RICHTEXT messages Stripped from Exchange to Sendmail... Vince0000 Linux - General 0 10-23-2003 12:10 PM
set content-type to 'text/html' in sendmail, using perl script brokenfeet Programming 3 08-05-2003 02:12 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration