Operating System - HP-UX
1753802 Members
8477 Online
108805 Solutions
New Discussion юеВ

Changing from in sendmail command

 
hpuserhk
Frequent Advisor

Changing from in sendmail command

Hello Friends
I am writing shell program where i am sending some attachment to list of emails,while executing script it is sending email but from it is taking default , i want to use my email as from instead of default eg: now it is taking abc@xyz.com as from(sender) i want to change it to myname@myemail.com,please advice how to do this
I am using sendmail command in script also advice how to attach file in sendmail , i am attaching file using < (redirection) its sending file but not as attachment but it display contents in mail

Thanks & Regards

6 REPLIES 6
Dennis Handly
Acclaimed Contributor
Rajeev  Shukla
Honored Contributor

Re: Changing from in sendmail command

Use Mpack http://hpux.connect.org.uk/hppd/hpux/Users/mpack-1.6/ which allows you to send the files as attachment and also you can change the sender to whatever you like.
Have a look at the man pages at the above site
hpuserhk
Frequent Advisor

Re: Changing from in sendmail command

Thanks Danis,

No specific reason for using sendmail

I will try with mailx,if possible please exact syntax of mailx to specicy own FROM adress (eg me@me.com) with attachment file(a.xls)

Thanks

Best Regards
VK2COT
Honored Contributor

Re: Changing from in sendmail command

Hello,

YOu already got some good advice.

And here is more:

a) There is nothing wrong with this syntax to
set up From: line with sendmail MTA itself:

# sendmail -fmyname@myemail.com recipient
b) Regarding attachments in email messages.
Many ways. Popular one is mutt:

# mutt -a myfile.doc -s "Word document enclosed" -x recipient
Cheers,

VK2COT
VK2COT - Dusan Baljevic
Dennis Handly
Acclaimed Contributor

Re: Changing from in sendmail command

>if possible please exact syntax of mailx to specify own FROM address (eg me@me.com)

If you followed the links, you would see "mailx -r me@me.com". And the second link has another link with a few more details:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=685447

Dennis Handly
Acclaimed Contributor

Re: Changing from in sendmail command

Here is another link. The first part is for HP-UX, even though it is now in a linux forum:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1263604