Attached HTML page to Email


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Attached HTML page to Email
# 1  
Old 11-24-2011
Attached HTML page to Email

Greeting all,
Not sure anyone tested to send out email with HTML page as attachment from Shell Script ?

I know if I use uuencode file.html approach, the mail receive in attachment is empty.

So I guess uuencode cannot be use for the html code. Appreciate if anyone can share the code to resolve this issue.

Thanks

---------- Post updated at 04:28 AM ---------- Previous update was at 02:15 AM ----------

ok, manage to do it using the uuencode myfile.html myfile.html |mail -s .... -r ... my.email.id
thank you!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting the Attached File in Email

Hi All, Is there a way on how to get the attached file in email using shell script? what i'm going to do? all i can see is to send and email but to get an attached file in email i don't find it. Please advise, Thanks, (4 Replies)
Discussion started by: znesotomayor
4 Replies

2. Shell Programming and Scripting

Accessing the html page

Hi All, In our unix server we have an apache web server running. Now, I want to create my own webpage. Therefore I created webpage at /export/home/test.html file. Where do I need to place this file and what do I need mention this page in my web browser to access it. Without apache... (1 Reply)
Discussion started by: Arasu
1 Replies

3. UNIX for Dummies Questions & Answers

Removing attached doc from an email

How would you approach a problem of removing an attached document from an email? Later I would parse that attachment and put the data into a database. Can do that part. Unfortunately, I'm not use to the various mail programs - have been looking at sendmail and postfix but haven't... (1 Reply)
Discussion started by: TJ_Green
1 Replies

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

5. Red Hat

Publishing HTML Page

Hi All, Thanks for reading. I am not sure if I am asking this in the correct group. But here it goes: There is a shell script which does some system checks and creates an html file called system_summary.html on my Red Hat machine say in /reports directory every hour. Now I want to view it... (6 Replies)
Discussion started by: deepakgang
6 Replies

6. UNIX for Dummies Questions & Answers

Publishing HTML Page

Hi All, Thanks for reading. I am not sure if I am asking this in the correct group. But here it goes: There is a shell script which does some system checks and creates an html file called system_summary.html on my Red Hat machine say in /reports directory every hour. Now I want to view it... (1 Reply)
Discussion started by: deepakgang
1 Replies

7. Shell Programming and Scripting

Referring to attached images in html email body through mailx

encoding type for images? (5 Replies)
Discussion started by: biswasbaishali
5 Replies

8. Web Development

findstr in html page

I am planning to create an html page that will count number of connected ports, challenge for me is how to put it in a page. Thanks! (1 Reply)
Discussion started by: webmunkey23
1 Replies

9. UNIX for Dummies Questions & Answers

Accessing a HTML page

Hi All, In our unix server we have an apache web server running. I can access the default apache web page from my windows machine. Now, I want to create my own webpage. Therefore I created webpage at /export/home/myname/test.html file. Where do I need to place this file and what do I need... (2 Replies)
Discussion started by: pkm_oec
2 Replies

10. Solaris

Accessing a HTML page

Hi All, In our unix server we have an apache web server running. I can access the default apache web page from my windows machine. Now, I want to create my own webpage. Therefore I created webpage at /export/home/myname/test.html file. Where do I need to place this file and what do I need... (0 Replies)
Discussion started by: pkm_oec
0 Replies
Login or Register to Ask a Question
HTML::RewriteAttributes::Resources(3pm) 		User Contributed Perl Documentation		   HTML::RewriteAttributes::Resources(3pm)

NAME
HTML::RewriteAttributes::Resources - concise resource-link rewriting SYNOPSIS
# writing some HTML email I see.. $html = HTML::RewriteAttributes::Resources->rewrite($html, sub { my $uri = shift; my $content = render_template($uri); my $cid = generate_cid_from($content); $mime->attach($cid => content); return "cid:$cid"; }); # need to inline CSS too? $html = HTML::RewriteAttributes::Resources->rewrite($html, sub { # see above }, inline_css => sub { my $uri = shift; return render_template($uri); }); # need to inline CSS and follow @imports? $html = HTML::RewriteAttributes::Resources->rewrite($html, sub { # see above }, inline_css => sub { # see above }, inline_imports => 1); DESCRIPTION
"HTML::RewriteAttributes::Resources" is a special case of HTML::RewriteAttributes for rewriting links to resources. This is to facilitate generating, for example, HTML email in an extensible way. We don't care about how to fetch resources and attach them to the MIME object; that's your job. But you don't have to care about how to rewrite the HTML. METHODS
"new" You don't need to call "new" explicitly - it's done in "rewrite". It takes no arguments. "rewrite" HTML, callback[, args] -> HTML See the documentation of HTML::RewriteAttributes. The callback receives as arguments the resource URI (the attribute value), then, in a hash, "tag" and "attr". Inlining CSS "rewrite" can automatically inline CSS for you. Passing "inline_css" will invoke that callback to inline "style" tags. The callback receives as its argument the URI to a CSS file, and expects as a return value the contents of that file, so that it may be inlined. Returning "undef" prevents any sort of inlining. Passing "inline_imports" (a boolean) will look at any inline CSS and call the "inline_css" callback to inline that import. This keeps track of what CSS has already been inlined, and won't inline a particular CSS file more than once (to prevent import loops). SEE ALSO
HTML::RewriteAttributes, HTML::Parser, Email::MIME::CreateHTML AUTHOR
Shawn M Moore, "<sartak@bestpractical.com>" LICENSE
Copyright 2008-2010 Best Practical Solutions, LLC. HTML::RewriteAttributes::Resources is distributed under the same terms as Perl itself. perl v5.10.1 2010-11-18 HTML::RewriteAttributes::Resources(3pm)