Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to send an email to an address with spaces?

Posted on 2008-09-29
8
Medium Priority
?
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Accepted Solution

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

0
 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
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…
Six Sigma Control Plans

661 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