I have a ksh script, in which it sends mail successfully but from root id(root@system.com). I want it to be sent as customid@system.com.
I verified man pages of mail, and found '-u userid' option. But it is failing.
I saw some other discussion also, but i cannot find the exact one. Most of the discussion is based on Solaris box, with -r option, that doesn't work in AIX.
Please guide me to make this happen successfully.
i tried like below:
mail -s "test mail from test environment" arunprasad@domain.com (thangaraj)
as per above code, i logged in with my account: arunprasad and i am sending mail to my id, but the mail will be sent as with thangaraj id, not from my id.
Please correct me if my understanding is wrong.
Below is the error message i am getting when execute the above code:
ksh: syntax error: `(' unexpected
Start using the Forum's 'Search' functionality to locate similar posts.
The 'google unix.com' is located in the upper right corner of the portal.
Search for sendmail+different+user for example.
Arun ,
Can you help me to understand how to post a question in this form i am able to reply to the questions but not the other way around.. Sorry to trouble you but i am new this site ...any help would be greatly apprecaited
and one more,
i have tested the same with the below code:
prompt>echo "test" | mail -r "\"someothermailid"\" -s "sample" arunprasad.thangaraj@domain.com
prompt>
The below is the sender information:
Note: i received mail successfully with different sender name. what i logged in as "myownid". Now i can able to change the sender mail id.
I am using Lotus Notes and the above mail will display as "123/C//Company/someothermailid/USR " and date and subject in my inbox. When i open only i can see the mail address of the sender. This postmaster note is not changing.
My another requirement is, to send a mail which receives like: "someothermailid <someothermailid@domain.com>" not like "123/C//Company/someothermailid/USR <someothermailid@domain.com>".
can you please help me out, how i can achieve this?