Solved

How to send an email to an address with spaces?

Posted on 2008-09-29
8
169 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 5

Accepted Solution

by:
SmartIntel earned 425 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

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…
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…

830 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