Changing the sender Email address to Alias

Hi All,

I want to change the email address of the sender to some alias
for eg:

FROM:noreplyecommerce@test.com needs to be changes to TEST

Please help me.

I am not sure where you want to do the change. Is it a textfile, a variable, a command to actually send the mail, ... ?

Please explain your problem as exactly as we are expected to explain the solution to you.

bakunin

I am using the below nawk, to Send notifications.

Currently ,if Ind='Y' Then a member will be notified with a message which uses a template1 and FROM display would be :noreplyecommerceqa@test.com I want to change this to TEST1

and if Ind!='Y' Then a member should be notified with a message which uses a template2 and FROM display should be :TEST2 instead of noreplyecommerceqa@test.com

 
{ 
   sEmail = substr($0, 21, 50);
   sRefNo = substr($0, 1, 20);
   sAppID = substr($0, 71,6);
   InD = substr($0, 81,1);
   mail = "/usr/bin/mailx -b sithara@yahoo.com -r noreplyecommerce@test.com -s \"subject\" to_addr";   
   gsub("to_addr", sEmail, mail);
   
   if ( sAppID == "MOS   " )
 {
   if ( InD == "Y" )
     {
   gsub("subject","TEST 1 Notification ", mail);
      system("sed \'s/<<ref_no>>/" sRefNo "/g\' template1 | " mail);
     }
   else
     {
   gsub("subject","TEST 2 Notification ", mail);
      system("sed \'s/<<ref_no>>/" sRefNo "/g\' template2| " mail);
     }
 }
   
}
 

Uh, i would like to do the same.
Is it even possible ?