Solved

How to send an email to an address with spaces?

Posted on 2008-09-29
8
157 Views
Last Modified: 2012-05-05
I have a perl script that uses mailx to email a group of people and email groups. Two of the groups have spaces in the names.  In my variable for the address, $TO, I have tried using double quotes single quotes around the group with spaces but no luck.
0
Comment
Question by:MatthewF
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 1

Expert Comment

by:scuzzie
ID: 22595799
try using angled brackets
<with spaces@somewhere.com>

0
 

Author Comment

by:MatthewF
ID: 22595892
I tried $add1="<Client Number\@Life.com>"; and I get the following error when I tried to run it

sh: syntax error at line 1: `<' unexpected
0
 
LVL 1

Expert Comment

by:scuzzie
ID: 22596361
hmm, don't know then. it is valid to have a space as far as i know. maybe whatever library you are using doesn't support it, or strips it out
0
 
LVL 5

Accepted Solution

by:
SmartIntel earned 425 total points
ID: 22596363
have you tried
$add="\'Client Number\@Life.com\'";

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:MatthewF
ID: 22596425
SmartIntel:, yes and this didnt work either
0
 
LVL 48

Expert Comment

by:Tintin
ID: 22599957
What code/module are you using to send the mail?
0
 

Author Comment

by:MatthewF
ID: 22600003
a system call to mailx
0
 
LVL 48

Expert Comment

by:Tintin
ID: 22600693
Can you please show us the exact system call in your script.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now