Sponsored Content
Top Forums Shell Programming and Scripting Sending HTML attachment through mail Post 302214948 by sushovan on Tuesday 15th of July 2008 08:05:20 AM
Old 07-15-2008
Java Sending HTML attachment through mail

Hi
I am new to unix and scripting.I am trying to send a html file as an attachment.
SUBJECT="Type of Exceptions in Application"
TO=Sushovan.Samals@gmail.com
SPOOLFILE=/data/reg/tlogs/Monitor.html
#echo "Send the E-mail message..."
uuencode $SPOOLFILE $SPOOLFILE | mailx -s "$SUBJECT" $TO

But the message i am getting contains text which are garbled.I donot have the permission to use sendmail option(i think so as it is command not found for the path).
So how to send a mail containing html attachment.Please suggest.Thanks in advance.

Regards
-S
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error when sending mail attachment

I have been sending an email attachment from my unix box, but keep getting an error? All though the recipient still receives the email and attachment. Will this error cause problems in the future and how to I cure it? $ uuencode PReSvPRINTER.txt file | mailx -s "File" me@world.com uuencode:... (1 Reply)
Discussion started by: dbrundrett
1 Replies

2. UNIX for Dummies Questions & Answers

Sending attachment thru a mail

Is there any way we can send file attachemnts through mails from a unix server. Does the 'mail' command have such an option ?? (1 Reply)
Discussion started by: Rohini Vijay
1 Replies

3. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

4. Shell Programming and Scripting

Problem in sending inline html with an attachment using sendmail

MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=border --border Content-Type: text/html Content-Disposition: inline <html><body><h2>This text should be displayed with html formatting</h2></body></html> --border Content-Type: text/plain Content-Disposition: attachment This text... (2 Replies)
Discussion started by: thulasidharan2k
2 Replies

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

6. Shell Programming and Scripting

Sending a csv attachment and html text together.

Hello, I need to send below text (in a file ABC)as html text in mail body and the same as csv attachment 1,2,3 4,5,6 7,8,9 but to send as html text in mailbody we use echo "Subject: Report " | cat - ABC | /usr/lib/sendmail -t a@xyz.com and to send as an attachment in csv format we... (9 Replies)
Discussion started by: skhichi
9 Replies

7. UNIX for Advanced & Expert Users

Sending mail with attachment

Hi, I am using Sun solaris OS unix server I am trying to send mail with an attachment using below script cat test.txt;uuencode test.txt test.txt|mailx -s "$subject" someone@somewhere I m getting mails but with no attachment. Hence i manipulate the script as below and i am... (2 Replies)
Discussion started by: sv0081493
2 Replies

8. Shell Programming and Scripting

Need help in sending html mail with attachment

Hi Everyone, I am facing problems in sending html mail with attachemnt. I will able to send mail with attachment (plain text ) using mailx -s and uuencode command and also html mail without attachment using sendmail option. However I am not able to send html mail along with attachment.Either... (2 Replies)
Discussion started by: karthik adiga
2 Replies

9. Shell Programming and Scripting

HTML mail with Attachment

Hi, I am using the below code: #!/bin/ksh SUBJ="Send mail from Unix with file attachments" TO=sudha.viswanathan@jpmorgan.com CC=sudha.viswanathan@jpmorgan.com ( cat << ! To : ${TO} Subject : ${SUBJ} Cc : ${CC} ! cat << ! MIME-Version: 1.0 Content-Type: text/html `cat... (1 Reply)
Discussion started by: sudvishw
1 Replies

10. How to Post in the The UNIX and Linux Forums

Sending a mail with different attachment in AIX

How to Send a mail with multiple attachment also differenet extension using uuencode in AIX. Can you please help me. Its so urgent. Thanks. Regards, Swapnil ---------- Post updated at 05:37 AM ---------- Previous update was at 05:35 AM ---------- I have below code. But attachment... (1 Reply)
Discussion started by: Swapnil Mawle
1 Replies
COURIERFAX(8)						      Double Precision, Inc.						     COURIERFAX(8)

NAME
courierfax - Send faxes via E-mail SYNOPSIS
sendmail [5558888@fax] sendmail [5558888@fax-lowres] sendmail [5558888@fax-ignore] sendmail [5558888@fax-cover] DESCRIPTION
The courierfax module (if enabled by the system administrator) sends E-mail messages by fax. Addressing an E-mail message to the address 5558888@fax faxes a printed copy of the message to the specified phone number. The ability to send faxes may be restricted, or not available. The E-mail message may be a MIME-formatted message. All attachments are concatenated and sent together in a single fax transmission. courierfax only knows how to handle certain kinds of attached. Obviously, trying to fax a voice .mp3 attaching is not going to work. courierfax knows how to handle plain text, Postscript, and PDF MIME attachments. courierfax might also know what to do with other kinds of attachment, depending on some optional software installed by the system administrator. courierfax may also be able to read GIF, PNG, and JPEG images. Note Color images are converted to black-and-white. Images are faxed with one image per fax page (limiting image sizes to about 1600x2200). The message will be returned as undeliverable if courierfax doesn't know how to handle a MIME attachment. If the first MIME section in the E-mail message is plain text, the text appears on the fax cover page. The sender/recipient information for the cover page is taken from the message's headers. The default courierfax configuration tries to resend the fax for up to eight hours, after which the message is returned as undeliverable. The message will also be returned as undeliverable if the fax transmission is interrupted. The return bounce will state how many pages were successfully transmitted. "@fax" may also be followed by additional keywords that specify extra options: -lowres Send a low-resolution fax. -ignore Ignore any attachment types that courierfax doesn't understand. -cover Send a cover page only. This is useful in limited situations, with something like this in a dot-courier(5)[1] file: ./Maildir ! 5552222@fax-cover This .courier file faxes the contents of a message, sans any attachments, immediately upon receipt in addition to saving the message in the mailbox. FAX TRANSMISSION RECEIPT
The sender will receive a fax transmission receipt if the sender requests an ESMTP delivery status notification. This is the -N option to sendmail(8)[2]: sendmail -Nsuccess 5556666@fax <messagefile When using other mail software, consult the mail software's documentation for instructions on requesting ESMTP delivery status notifications. ADDITIONAL DIALING OPTIONS
courierfax configurations that are generated by the webadmin tool for North American environments usually restrict phone numbers to a standardized ten-digit telephone number, so that the fax address is always <aaabbbcccc@fax>, and courierfax silently performs any needed conversion to dial the number (such as adding "1" or dropping the local areacode). It is also possible to reconfigure courierfax so that it accepts any telephone string and dials it without any preprocessing. If so, the address may contain any combination of digits, letters "A", "B", "C", and "D", representing the four extra dialing tones not normally accessible from most telephone keypads, the symbols "*" and "#", or the following characters: W Most faxmodems pause and wait for a secondary dialtone, before dialing the rest of the number. - The dash is replaced by a comma in the dialing string. A comma results in most faxmodems pausing for two or three seconds before dialing the rest of the number. It is not possible to enter a comma directly, because commas are used to separate multiple E-mail addresses. Use dashes instead of commas in the dialing string. courierfax replaces all dashes with commas before dialing the faxmodem. + Similarly, courierfax replaces all pluses with "@" characters before dialing. An "@" characters results in most faxmodems waiting for the line to be silent for five seconds before dialing the rest of the number. It is not possible to enter a "@" directly as part of the telephone number itself, for the obvious reasons. Use pluses instead of "@"s in the dialing string. courierfax replaces all pluses with "@" before dialing the faxmodem. CONFIGURATION
The slightly arcane configuration file, /etc/courier/faxrc, sets up which dialing strings are valid. The default configuration file contains judicious comments that explain all the parameters, and what they do. The default configuration file disables courierfax by rejecting all telephone numbers. The file must be edited in accordance with the embedded instructions, in order to enable faxing. Using webadmin is highly recommended. Upon demand, webadmin will install a suitable configuration file for the North American numbering plan, that receives all telephone numbers as ten-digit numbers, and adds any required long distance prefix, or removes the local area code, as appropriate. Or, webadmin will install a bare-bones configuration file that dials any requested phone number, without any editing or transformation. BUGS
There is no good way to sleep until a modem lock is released, so we poll every minute. SEE ALSO
courier(8)[3]. AUTHOR
Sam Varshavchik Author NOTES
1. dot-courier(5) [set $man.base.url.for.relative.links]/dot-courier.html 2. sendmail(8) [set $man.base.url.for.relative.links]/sendmail.html 3. courier(8) [set $man.base.url.for.relative.links]/courier.html Courier Mail Server 04/04/2011 COURIERFAX(8)
All times are GMT -4. The time now is 03:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy