Home Man
Today's Posts

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Mailx issue; email address starting with #

shell scripts

Login to Reply

Thread Tools Search this Thread
# 1  
Old 04-24-2018
Mailx issue; email address starting with #

Hello All,

I have a requirement to generate report and send them to a distribution list.
The problem I am facing is when sending out the email using mailx.
The email address (DL) we have is starting with # and because of this it's not recognising the email and throwing the below error.

Error"Send options without primary recipient specified"

When I try to put the email under "" then no email has been send out.

Appreciate your suggestions on this issue.




echo "$BODY" | mailx -r "$SENDER" -s "$SUBJECT" -a "$ODFILENAME" -a "$LOFILENAME" "$RECIPIENT"

# 2  
Old 04-24-2018
Hello Pradeep_Raj ,

A few questions first, I'm afraid:-
  • What OS and version are you using?
  • Have you tried escaping the # with a \ like this:-
  • What is the value of $RECIPIENT before you start?

Thanks, in advance,
The Following User Says Thank You to rbatte1 For This Useful Post:
Pradeep_Raj (04-24-2018)
# 3  
Old 04-24-2018
Hi Robin,

I did a echo and could see $RECIPIENT has the full email address as the value.
I tried with escape / with no luck.

OS and Version:
Linux servername 2.6.32-358.18.1.el6.x86_64 #1 SMP Fri Aug 2 17:04:38 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

Appreciate your suggestion on this issue.

Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Mailx options to change from address arun888 Shell Programming and Scripting 3 09-22-2015 06:32 AM
Email address change issue elixir_sinari Forum Support Area for Unregistered Users & Account Problems 3 10-16-2012 03:48 PM
mailx to external email address FlyingSquirrel OS X (Apple) 4 07-21-2011 09:34 AM
email address starting with dash akaq AIX 1 06-26-2009 04:52 AM
How to verify email address using mailx command ? rak007 UNIX for Dummies Questions & Answers 1 06-11-2009 07:17 AM
how to know if the mailx command really sends the mail to the email address? sheenshine Shell Programming and Scripting 3 09-17-2008 08:34 AM
change from address in mailx koti_rama Shell Programming and Scripting 1 09-26-2007 04:26 AM
mailx- can we change the from address in the email that is sent out. radhika UNIX for Dummies Questions & Answers 5 09-21-2005 07:37 AM
Send email where # is in the email address - Using Unix jingi1234 UNIX for Dummies Questions & Answers 1 05-23-2005 11:23 AM
Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win) Vetrivela UNIX for Advanced & Expert Users 2 02-15-2005 09:43 AM

All times are GMT -4. The time now is 09:47 AM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
Show Password