1825783 Members
2103 Online
109687 Solutions
New Discussion

Re: mailx recipient

 
SOLVED
Go to solution
Amit Kureel
Advisor

mailx recipient

I have a script that uses mailx to send mails. But I want to add a new mail-id that has spaces in its name, like, "Amit Kureel@Verizon.com".

The problem is that the Lotus Notes Server and Client have no problem working with such mail-ids whereas the mailx simply doesn't recognize and the problem is aggravated when I have multiple such addresses. Anybody has any thoughts on how to make it work.

Thanks in advance.

Amit Kureel
amit_kueel@yahoo.com
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: mailx recipient

That is likely to confuse poor little mailx.

My first suggestion is(No test box right now):


mailx -s "Important email" "Amit Kureel@Verizon.com"

Please give that a test and report results okay?

If its a solution, please point the post.

Good Luck.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Amit Kureel
Advisor

Re: mailx recipient

Well, I tried double-qoutes (even single qoutes!) but that doesn't work. Any other ideas ?
Chris Vail
Honored Contributor

Re: mailx recipient

Don't use mailx. Try mutt from www.mutt.org. Its a niftier MUA.


Chris
Steven E. Protter
Exalted Contributor

Re: mailx recipient

Might want to set up an smtp alias.

/etc/mail/aliases

Amit Kureel@verizon.com : Amit_kureel@verizon.com

or the other way around.

In the end, mailx might not be able to handle it.


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Schussele
Honored Contributor
Solution

Re: mailx recipient

Hi Amit,

First thing to point out is that address style does *not* meet the RFC (can't remember the # now) that defines address syntax. It would be undeliverable in the majority of mail systems in the world.
That recipient should be giving you a valid address or I'd tell them not to expect any mail from your system. It should not have to be your responsibility to fix things broken by other's inability to follow rules. I'd be telling THEM to set up aliases.
OK, I'm off my soapbox now.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Patrick Wallek
Honored Contributor

Re: mailx recipient

I would agree with Jeff 110%!!!! I seriously doubt that you'll be able to get it to work without changing the Lotus Notes id. I doesn't really matter that it works with Notes. That is a VERY non-standard non-RFC mail id.
Amit Kureel
Advisor

Re: mailx recipient

Thanks to all of you, for a great response, especially Jeff, who put things in perspective in a very technical manner. I didn't get a chance to try Steven's suggestion, but I also had the same idea in my mind. Although, Chris' suggestion doesn't help in my current script (nobody is willing to go for a new utility as it takes time to learn and stabilize) but it will really be useful in any further work (and I have already started uusing it for newer scripts!

Anyway, I got a single-word alias created for my script and things are in shape.

Thanks again!

P.S. : I have assigned points

Amit Kureel