Sponsored Content
Top Forums Shell Programming and Scripting html format email with attachment in unix Post 302548757 by jayan_jay on Friday 19th of August 2011 08:24:19 AM
Old 08-19-2011
try this..

Code:
outputFile="/tmp/out.html"  
attachFile="/tmp/attach.html"
(
echo "From: abc@abc.com" 
echo "To: abc@abc.com"
echo "Subject: Test"
echo "Mime-Version: 1.0"
echo 'Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw"'
echo "Content-Disposition: inline" 
echo "" 
echo "--GvXjxJ+pjyke8COw" 
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
cat $outputFile
echo "" 
echo "--GvXjxJ+pjyke8COw"
echo "Content-Type: text/plain"
echo "Content-Disposition: attachement; filename=attachment_filename.html"
echo "" 
cat $attachFile
) | /usr/lib/sendmail -t

These 4 Users Gave Thanks to jayan_jay For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

send email from unix with attachment

Hello All, This is a common question that I found lot of results in the forums. I am trying to use uuencode to attach a file and send email. I have no issues sending email, but not able to attach any files using sendmail. Is uuencode part of sendmail or does 'uuencode' utility need to be... (1 Reply)
Discussion started by: chiru_h
1 Replies

2. Shell Programming and Scripting

Format disorder after email with attachment

Hello My script is to email a textfile(abc) in unix. I open abc.txt using window notepad. All the "Enter Key"(line break) are found missed. However, it is no problem using window wordpad. uuencode abc abc.txt | mailx -s "Email Subject" someone@email.com How can I adjust the above command... (1 Reply)
Discussion started by: on9west
1 Replies

3. Shell Programming and Scripting

UNIX file attachment in email

Hi, I have a syntax for mail attachment as $EMAIL "Wrapper $wrapper_script_name has failed" " $wrapper_script_name has Failed " $failed_email_address and $EMAIL is as below MSGSub=${1} MSGText=${2} RMAIL=${3} #set LANG='' export LANG='' echo "${MSGSub}" | mailx -s "${MSGText}" ... (1 Reply)
Discussion started by: satgur
1 Replies

4. UNIX for Advanced & Expert Users

How to send email as HTML format with attachment ?

hi.. Could somebody help me how to sent an attachment using sendmail command and the content is HTML format ?. Below is my code to sent the email as HTML but i do not know how to sent the attachment, please help me To: "BAHARIN HASAN"<baharin.hasan@gmail.com> from: "DATAONE SDN... (4 Replies)
Discussion started by: bh_hensem
4 Replies

5. Shell Programming and Scripting

Format of content displayed in the attachment of email

Hi, I'm facing a problem in mailing attachments using uuencode in mailx. I got to attach a couple of flatfiles. I'm able to attach and mail the files successfully. But there is a problem in the format of the flatfiles when they are received as an attachemnt. For Example : Consider... (0 Replies)
Discussion started by: Sindhuap
0 Replies

6. UNIX for Dummies Questions & Answers

Sending html email with html attachment

Hello, I have a script which is sending an html file as an attachment. #!/usr/bin/ksh export MAILTO="user@company.com" export CONTENT="/usr/tmp/file.html" export SUBJECT="EmailSubject" ( echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" echo "Content-Type: text/html" echo... (0 Replies)
Discussion started by: sreenathkg
0 Replies

7. Shell Programming and Scripting

How to send email HTML + PDF attachment?

I am attempting to write a script where I can pass in parameters ( to , from, the location of a pdf attachment ) and send an email that has HTML for the body content and a PDF as an attachment. I have failed to achieve this with sendmail and mutt. I recently found this. If there are any... (2 Replies)
Discussion started by: jvsrvcs
2 Replies

8. Shell Programming and Scripting

Need syntax for mailing in UNIX by using html file as body and along with attachment

Hi All, I need a syntax for mailing in unix by using html code file output as body and along with attachment (without using mutt command) HTML code file : html1.txt Attachment : attach1.txt I was using the below codes but they are not working. ( cat html1.txt ; uuencode attach1.txt... (4 Replies)
Discussion started by: Rokkesh
4 Replies

9. UNIX for Advanced & Expert Users

Reading the Attachment from UNIX email

Hi - How would you read in the attachment from your unix mail account? The attachment is in BASE64 so I need to isolate those lines so I can convert them. The number of lines varies from a few to a few hundred. To complicate matters, the mail box gets non related emails I want to ignore. The lines... (3 Replies)
Discussion started by: Oliver Burns
3 Replies

10. HP-UX

Unable to send attachment with html tables in UNIX shell script

Heyy, any help would be grateful.... LOOKING FOR THE WAYS TO SEND AN EMAIL WITH ATTACHMENT & HTML TABLES IN BODY THROUGH SHELL SCRIPT (LINUX)..NOT SURE, IF WE HAVE ANY INBUILT HTML TAG OR UNIX COMMAND TO SEND THE ATTACHMENTS. KINDLY HELP below is small script posted for our understanding..... (2 Replies)
Discussion started by: Harsha Vardhan
2 Replies
GLFRAMEBUFFERRENDERB(3G)					   OpenGL Manual					  GLFRAMEBUFFERRENDERB(3G)

NAME
glFramebufferRenderbuffer - attach a renderbuffer as a logical buffer to the currently bound framebuffer object C SPECIFICATION
void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); PARAMETERS
target Specifies the framebuffer target. target must be GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER, or GL_FRAMEBUFFER. GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER. attachment Specifies the attachment point of the framebuffer. renderbuffertarget Specifies the renderbuffer target and must be GL_RENDERBUFFER. renderbuffer Specifies the name of an existing renderbuffer object of type renderbuffertarget to attach. DESCRIPTION
glFramebufferRenderbuffer attaches a renderbuffer as one of the logical buffers of the currently bound framebuffer object. renderbuffer is the name of the renderbuffer object to attach and must be either zero, or the name of an existing renderbuffer object of type renderbuffertarget. If renderbuffer is not zero and if glFramebufferRenderbuffer is successful, then the renderbuffer name renderbuffer will be used as the logical buffer identified by attachment of the framebuffer currently bound to target. The value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE for the specified attachment point is set to GL_RENDERBUFFER and the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME is set to renderbuffer. All other state values of the attachment point specified by attachment are set to their default values. No change is made to the state of the renderbuuffer object and any previous attachment to the attachment logical buffer of the framebuffer target is broken. Calling glFramebufferRenderbuffer with the renderbuffer name zero will detach the image, if any, identified by attachment, in the framebuffer currently bound to target. All state values of the attachment point specified by attachment in the object bound to target are set to their default values. Setting attachment to the value GL_DEPTH_STENCIL_ATTACHMENT is a special case causing both the depth and stencil attachments of the framebuffer object to be set to renderbuffer, which should have the base internal format GL_DEPTH_STENCIL. ERRORS
GL_INVALID_ENUM is generated if target is not one of the accepted tokens. GL_INVALID_ENUM is generated if renderbuffertarget is not GL_RENDERBUFFER. GL_INVALID_OPERATION is generated if zero is bound to target. SEE ALSO
glGenFramebuffers(), glBindFramebuffer(), glGenRenderbuffers(), glFramebufferTexture(), glFramebufferTexture1D(), glFramebufferTexture2D(), glFramebufferTexture3D() COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/. AUTHORS
opengl.org opengl.org 06/10/2014 GLFRAMEBUFFERRENDERB(3G)
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy