Sponsored Content
Top Forums Shell Programming and Scripting Changing the sender Email address to Alias Post 302451614 by sithara on Tuesday 7th of September 2010 11:33:05 AM
Old 09-07-2010
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

Code:
 
{ 
   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);
     }
 }
   
}

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mailx sender address customisation

Hi All, I'm on UNIX -Solaris... I'm trying to send mail usin Mailx..... The script is working fine and attachments are also being sent.... BUT, when I receive the mail,, the sender address shown is the unix login id name.... Any way by which I could manipulate this in my script command or any... (1 Reply)
Discussion started by: vasan_srini
1 Replies

2. AIX

Change sender e-mail address

When sending emails to the outside world, aix present itself as d_prod@production1.pdc.itercom.org. This is causing some issue with our e-mail server. So we need to change the name to d_prod@itercom.org... Does any one know how this can be accomplished? Thank you (3 Replies)
Discussion started by: cchiang12
3 Replies

3. Post Here to Contact Site Administrators and Moderators

changing my email address

Hello, Is there a link somewhere to my profile where I can change my email address to my new work email address? I have a new job and would like to receive a notification of responses to my new work address - how can I get that address to you without posting it online for everyone to see? ... (1 Reply)
Discussion started by: tekster757
1 Replies

4. UNIX for Dummies Questions & Answers

Different Sender Address

Hello Following command send link to division managers. echo http://severname:8081/account-reports/2008Jun19-2008Jun25.2/index.html | mail -s "Weekly Division Sales Report" johndoe@companmail.com QUESTION. Above command send a body which is link of division report in email with... (1 Reply)
Discussion started by: paulds
1 Replies

5. Shell Programming and Scripting

Sender email address has to changes

I am sending email with attachment using mail and uuencode command. Ex: (echo "$EMAIL_BODY"; uuencode $FILE ATTACH.TXT) || mail "$EMAIL_ID" -s "$EMAIL_SUB" I am getting email from "applmgr@rigelapp01.us.dell.com". I want to change this email address into... (1 Reply)
Discussion started by: balajiora
1 Replies

6. UNIX for Advanced & Expert Users

postfix sender address rewriting

Hi, I have a postfix server that relays to an exchange server. All of my unix/linux systems send to this server, the problem is the form the mail is sent with, the sender address is username@hostname.domain.local I need to rewrite every sender address to unix@maildomain.com for... (0 Replies)
Discussion started by: funksen
0 Replies

7. Red Hat

How to change sender email address in mail -s command

Just having trouble trying to figure out what the option is. When I do mail -s "Subject" someuser@example.com I can't seem to specify "from" or "sender" option as I need it for my task. I tried using --f or -f though it didn't work. Can someone please tell me what other option... (0 Replies)
Discussion started by: rockf1bull
0 Replies

8. Forum Support Area for Unregistered Users & Account Problems

Problem after changing email address

Hi, I updated my email address and since then I am not able to post in any other area than here, see the adds and am not able to edit my profile in the User CP. After saving the password change the page was redirected rather fast, so not sure if I need to do anything or if I have to wait for... (3 Replies)
Discussion started by: cero
3 Replies

9. Shell Programming and Scripting

Adding 'from' email address alias in Linux.

Hi Experts, We want to add the 'from' email address to mailx command in all our linux script. After searching this site I am able to find the command '-- -f' to add the from the email address. Bu the problem is our from email address is :- "Proper Support Name <support@company.com>" Now when I... (6 Replies)
Discussion started by: Amey Joshi
6 Replies

10. Forum Support Area for Unregistered Users & Account Problems

Problem changing the email address associated with my UNIX.com account

Hello I have had an account for many years. I have attempted to change the email address associated with my account. After logging-in to unix.com and revising my email address, I received a 're-verification' email at that new address. The first link in that email took me to a page with the... (1 Reply)
Discussion started by: irb
1 Replies
EMAIL-REMINDER-EDITOR(1)				User Contributed Perl Documentation				  EMAIL-REMINDER-EDITOR(1)

NAME
Email-Reminder-Editor - edit special occasion reminders SYNOPSIS
Simple editor for modifying special occasion email reminders. DESCRIPTION
Email-reminder allows users to define events that they want to be reminded of by email. Possible events include birthdays, anniversaries and yearly events. Reminders can be sent on the day of the event and a few days beforehand. This is a simple editor that allows users to add/modify their reminders. It saves changes automatically when the program is closed. OPTIONS
--help Displays basic usage message. --simulate Does not actually save any changes. --verbose Prints out information about what the program is doing. --version Displays the version number. FILES
~/.email-reminders AUTHOR
Francois Marier <francois@email-reminder.org.nz> SEE ALSO
collect-reminders, send-reminders COPYRIGHT
Copyright (C) 2004-2010 by Francois Marier Email-Reminder is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Email-Reminder is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Email-Reminder; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. perl v5.14.2 2012-05-28 EMAIL-REMINDER-EDITOR(1)
All times are GMT -4. The time now is 03:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy