Re: sending mail from application on SuSe

Joe Vigil <[email protected]>
Newsgroups gmane.comp.lang.4gl.fourjs.user
Message-ID <[email protected]>
We use shell scripts to automate sending of emails:
==============================================================
     {
     echo "To:[email protected]"
     echo "Subject:Weekly Chart"
     echo "From:"The Computer System" <[email protected]>"
     echo "MIME-Version: 1.0"
     echo "Content-Type: multipart/mixed;
         boundary=\"sendfile-attachment-boundary\""
     echo "This is a multi-part message in MIME format."
     echo
     echo "--sendfile-attachment-boundary"
     echo "Content-Type: text/plain;"
     echo "Content-Transfer-Encoding: 7bit"
     echo
     echo "The attached file is a PNG image file. "
     echo
     echo "--sendfile-attachment-boundary"
     echo "Content-Type: image/png; name=mtr_net_del_d.png"
     echo "Content-Transfer-Encoding: base64"
     echo "Content-Description: mtr_net_del_d.png"
     echo "Content-Disposition: attachment; filename=mtr_net_del_d.png"
     echo
     /usr/pd/mimencode /local/Web/metrics/mtr_net_del_d.png
     echo
     echo "--sendfile-attachment-boundary"
     }|/usr/sbin/sendmail -t
============================================================
Note that mimencode is part of the metamail distribution.

- Joe Vigil

Brian Grellinger wrote:

> Never tried on Linux, but on AIX we use a combo of mail and uuencode.
>  
> I want to send "picture.bmp" as an attachment, and "message.txt"
> contains my mail message:
> (cat message.txt; uuencode picture.bmp picture.bmp) | mail -s "A
> Message" [email protected]
>  
>  
>  
> Brian Grellinger
> I.S. Manager
> Doosan Infracore America Corp
> Information Systems
> 
> 
>>>>[email protected] 09/29/05 11:15AM >>>
> 
> Thanks for the tip! But....is there a way not to jump into an editor
> 
> The command I execute is  mutt -s "my fyle" -a /etc/inittab
> [email protected] 
> 
> Pressing return the system propose me the parameters and doing only
> enter an
> editor is opened in which we can make some notes.
> 
> But we don't want interaction when we send a mail.
> 
> Any solution?
> 
> Met vriendelijke groeten / Sincères salutations / Kind regards,
> 
> 
> Danny De Koster
> 
> 
> 
> 
> 
> 
> 
> 
> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:[email protected]]
> Namens
> Walter Haslbeck
> Verzonden: donderdag 29 september 2005 15:11
> Aan: [email protected] 
> Onderwerp: Re: [fourjs-users] sending mail from application on SuSe
> 
> Hi,
> 
> 
>>I'm looking for a tool to send easily mails and attachements from our
> 
> 
>>application. Anybody using such a tool ?
> 
> 
> mutt!
> 
> usage is simple:
> 
> e.g. RUN "mutt -s"Subject" -aAttachment.doc user@domain < textfile"
> 
> because mutt reads the mailbody from STDIN, you can pipe a report to
> mutt:
> 
> ...
> START REPORT myreport TO PIPE "mutt -s'Your Report' user@domain"
> ...
> 
> hth,
> Walter
> 
> 
> 

-- 
----------------------------------------------------------

This message, including any attachments, contains
confidential information intended only for a specific
individual and purpose.  It contains information which
is private, CONFIDENTIAL, PROPRIETARY, AND A TRADE
SECRET OF AVIBANK MFG., INC., and legally protected by
law.  If you are not the intended recipient, please
contact the sender immediately by reply e-mail and
destroy all copies.  You are hereby notified that any
disclosure, copying, distribution or use of the
contents of this transmission, or the taking of any
action or reliance thereon, is strictly prohibited
WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF AN
AUTHORIZED OFFICER OF AVIBANK MFG., INC.

In addition, U.S. export laws may apply to the
information contained in or attached to this message.
Export or re-export of this information is prohibited.

----------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.