Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to send an email to an address with spaces?

Posted on 2008-09-29
8
Medium Priority
?
184 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
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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

972 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