[Previo por Fecha] [Siguiente por Fecha] [Previo por Hilo] [Siguiente por Hilo]

[Hilos de Discusión] [Fecha] [Tema] [Autor]

[Ayuda] bashscript, mail con attachment



estoy haciendo un script para enviar archivos
adjuntos, estoy usando sendmail para enviarlo en el
encabezado, pero al momento de ejecutarlo me sale
esto...

sendmail: fatal: soporte_telco1(1016): unable to
extract recipients: message header length exceeds
safety limit

supongo no estoy delimitando bien los camposy esta
tomando el attachment, y por eso dice que es muy
grande... alguien podria darme un norte?.. envio el
script




#!/bin/bash

from=mireccion en correo com
subject='Cron-Bash attachment email script'
attachment=/home/quetzal/default.html
emailtarget=mireccion en correo com
msgdate=`date +"%a, %e %Y %T %z"`

boundary=GvXjxJ+pjyke8COw
daemail=$(cat <<!
Date: $msgdate
From: $from
To: $emailtarget
Subject: $subject
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=$boundary
Content-Disposition: inline

--$boundary
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This is the text that makes up the body of the email.

Anything you want to appear in the body of the message
should be put here.  Try to keep it generic since its
a
form email.  Something along the lines of,

The results of xyz script has been attached to this
email.

--$boundary
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=file.csv
!)
echo $daemail > msg.tmp
echo '\' >> msg.tmp
cat $attachment >> msg.tmp
echo '\' >> msg.tmp
echo --$boundary-- >> msg.tmp
email=`cat msg.tmp`
echo $email | /usr/sbin/sendmail -t
echo '----- para ver lo que envio a sendmail -------'
echo $email
rm msg.tmp



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com




[Hilos de Discusión] [Fecha] [Tema] [Autor]