sanjayroongta
18th June 2003, 10:30
Kindly advice how to attach a file in sendmail command.
thanx in advance
Rgds
Sanjay
bamnsour
18th June 2003, 10:51
Try to search for uuencode on BaanBoard Search. You will get some very good threads that talk about this.
- Bader
sanjayroongta
19th June 2003, 12:06
Hi Bader
Thanls for tips. I tried following script :
uuencode <sourcefile> <destfile> | mailx -s "Mesg subject" -r <sender mail id> <receipient mail id>
Above statement works fine, But the problem is when i recd mail there is no sender same specified. I tested out this on Solaris with Postmaster Mail server and at cleint end I am using outlook express.
Pls help me out.
rgds
Sanjay:confused:
bamnsour
19th June 2003, 12:58
Hi Sanjay,
You may want to download a utility called mmencode or mimencode for Solaris.
I would do a search on google for "mimencode Solaris"
mimencoding makes mime encoding. It is better than uuencoding, the default for Unix.
- Bader
sanjayroongta
19th June 2003, 14:59
Hi
I think problem in mailx command becoz uuencode is working fine. I test only mailx command from $ prompt which following sytan :
$ mailx -s "test" -r sanjay@xyz.com sanjay@xyz.com
with above i recd. the mail with test subject but again sender unspecified.
pls tell me alternate option of mailx.
rgds
Sanjay
bamnsour
19th June 2003, 15:09
If mailx is not working properly, then you need to contact Sun and get patch.
Other options are:
mail - much more simple than mailx
sendmail - You can "program" the header using sendmail switches.
- Bader
mpenno
19th June 2003, 17:10
I use program MUTT ( freeware for multiple OS ) .
where -a -----> file attach
-s -----> subject
Bye
Max
norwim
20th June 2003, 10:00
What I often do is the following:
use a telnet session on port 25 (smtp)
I create a file (named here XXX) such as:
----start of file XXX-------
HELO username
MAIL FROM: username@domainname
RCPT TO: destinationname@destinationdomain
RCPT TO: anotherdestinationname@anotherdomain
DATA
From: This_will_be_displayed_as_sender
To: This_will_be_displayed_as_receiver
Subject: This_will_be_displayed_as_subject
TExt
Text
Text
Text
.
BYE
-----end of file XXX-----
If I prompt now:
cat XXX | ip_of_mailhost 25
The email gets sent.
So from within a Baan application, I simple create a file like the above and execute the command like the above via shell().
Works perfectly here.
To test it, open a telnet session on port 25 of your mailhost and issue the smtp-commands by hand.
HTH
Norbert
sanjayroongta
21st June 2003, 11:43
Hi Mr Bader
Problem resolve after loading necessary patches. now in mailx -r is working perfectly.
There is one more query when i try this in BaaN script with shell() it also works perfectly, but when i try to sent mails to multiple receipent either we have to mentioned all mail id's or initiate script again and again. Pls suggest me how can i pass the value of a variable (i.e. mail id) in below script.
x=<email id's>
uuencode /x/x /x/x.doc | mailx -s "test" -r sanjay@xyz.com x
thanx in advance
regds
Sanjay
Neal Matthews
21st June 2003, 13:18
Just seperate the E mail ID's in variable x with ,
ie. x=user1@intier.com,user2@intier.com,user3@intier.com
Hope this helps
Neal Matthews
Intier Automotive - IT Support Analyst