The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Connection refused Dudu1984 IP Networking 1 06-04-2008 06:04 PM
How to send Mail with Attachement chgopi Shell Programming and Scripting 6 02-03-2006 05:46 AM
Connection refused from pop server bluehell IP Networking 2 06-20-2003 10:03 AM
Send a mail with an attachement of a file gaddeg UNIX for Dummies Questions & Answers 2 07-23-2002 02:01 PM
Send a mail with a subject and an attachement josecollantes UNIX for Dummies Questions & Answers 1 08-27-2001 11:55 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-08-2008
samuelc samuelc is offline
Registered User
  
 

Join Date: May 2007
Posts: 2
Arrow Send email with attachement-Getting connection refused by domain

Hi all,
I am a newbie to unix.
I need to send an email with an attachment in unix to some id like abc@some_company.com

Code i have used is


------------Code---------------------------
#!/bin/ksh
set -x
#set -n
#cript: unix_mail_withattachments.ksh
# Aurthor: Ravin Maharaj
# Purpose: Use sendmail to e-mail messages from Unix with
# file attachements
# --------------------------------------------------------------------

SUBJ="Send mail from Unix with file attachments"
TO=a@some-company.com
CC=b@some-company.com
(
cat << !
To : ${TO}
Subject : ${SUBJ}
Cc : ${CC}
!

cat << !
HOPE THIS WORKS
This sample E-mail message demonstrates how one can attach
files when sending messages with the Unix sendmail utility.
!

uuencode ${file_1} ${file_1}


) | sendmail -v ${TO} ${CC}

------------Code---------------------------

After which I run "mutt command I get message like "Connection refused by say some_company.com".

What needs to be done?
Any help will be great.

Last edited by samuelc; 02-08-2008 at 02:38 AM..
  #2 (permalink)  
Old 02-08-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Cool Something to try?

uuencode file.txt file.txt | mailx -s "subject" samuel@company.com
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0