Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to send email as HTML format with attachment ? Post 302478839 by bh_hensem on Thursday 9th of December 2010 03:56:38 AM
Old 12-09-2010
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

Code:
To: "BAHARIN HASAN"<baharin.hasan@gmail.com>
from: "DATAONE SDN BHD"<admin@dataone.asia>
Subject: test
Content-Type: text/html
charset="us-ascii"

<html>
<head>
<title>Your Page Title</title>
</head>

<body>
<center>
<table border=0>
  <tr>
    <th><img border=0 src=/images/pulpit.jpg alt=Pulpit rock width=67 height=92 /></th>
    <th><p>&nbsp;</p><h2>Bill Statement</h2></th>
  </tr>

  <tr>
  <td><h4>Dear <ASMAH_AHMAD>,</h4>
  <p>Thank you for your valued subscription to our<br/>
     services.Your TM bill statement is now attached as <br/>
     an Adobe PDF file in this email.</p>
  <p>Thank You</p></td>
  <td><p>Account No.</p><p><12345></p>Statement Date.<p><12/12/2010></p></td>
  </tr>
</table>
<center><img src=example.jpg alt=example/></center>
</center>
</body>
</html>

Thank you,
baharin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send an attachment and html text both in the same mail

Hi all, I am working on UNIX (Solaris28). I would like to send an email in which the body will be in html format and, in the same mail, a xls file has to be attached. I have tried this: the file is correctly attached but the body comes as html source and not formatted. If I do not attach the... (4 Replies)
Discussion started by: stefan.yu
4 Replies

2. UNIX for Dummies Questions & Answers

AIX send mail with HTML message body and a binary attachment

I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements: 1. command line switch to specify file name containing message body in HTML format 2. command line switch to specify file name of a binary attachment 3. command line or input file to specify... (4 Replies)
Discussion started by: G-Man
4 Replies

3. Shell Programming and Scripting

unable to send an email attachment

i know its pretty repeated query, but i need to post it in this new thread coz i need it urgently uuencode /var/tmp/chandra/emaillist.txt emaillist.txt | mail -s "message with encoded attachment" am unable to send the attachment emaillist.txt present in the path /var/tmp/chandra/ Is... (11 Replies)
Discussion started by: cmaroju
11 Replies

4. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

5. Shell Programming and Scripting

Unable to send mail with inline html along with attachment. Please help!

The below code is not working. I am able to send only inline html or only attachment. When trying to do both, only inline html is sent without attachment. Please help! #!/bin/ksh (echo "Subject: Test Mail - HTML Format" echo "MIME-Version: 1.0" echo "Content-Type: text/html" echo... (1 Reply)
Discussion started by: thulasidharan2k
1 Replies

6. Shell Programming and Scripting

html format email with attachment in unix

Team, I have the below code, which is working fine and it sends the html report using sendmail command. I want to attach one more file ( which goes as attachment ) in that email. How to achieve it. i tried with uuencode. But no luck :mad: outputFile="/tmp/out.html" ( echo... (2 Replies)
Discussion started by: itkamaraj
2 Replies

7. 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

8. Shell Programming and Scripting

Not able to send attachment with the email

Hi All, The below code is working fine for me. mailx -s hello abc@xyz.com <<EOT Hello !!! How are you? Regards Rahul EOT But i am not able to send csv file with the mail .Getting just themail but not the attachment. uuencode /path/s1.csv | mailx -s hello abc@xyz.com <<EOT... (9 Replies)
Discussion started by: rafa_fed2
9 Replies

9. 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

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
PPI::Statement::Null(3) 				User Contributed Perl Documentation				   PPI::Statement::Null(3)

NAME
PPI::Statement::Null - A useless null statement SYNOPSIS
my $foo = 1; ; # <-- Null statement my $bar = 1; INHERITANCE
PPI::Statement::Null isa PPI::Statement isa PPI::Node isa PPI::Element DESCRIPTION
"PPI::Statement::Null" is a utility class designed to handle situations where PPI encounters a naked statement separator. Although strictly speaking, the semicolon is a statement separator and not a statement terminator, PPI considers a semicolon to be a statement terminator under most circumstances. In any case, the null statement has no purpose, and can be safely deleted with no ill effect. METHODS
"PPI::Statement::Null" has no additional methods beyond the default ones provided by PPI::Statement, PPI::Node and PPI::Element. SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.18.2 2011-02-25 PPI::Statement::Null(3)
All times are GMT -4. The time now is 03:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy