Operating System - OpenVMS
1828171 Members
2659 Online
109975 Solutions
New Discussion

Re: Email address with &

 
SOLVED
Go to solution
Denis Michaud
Occasional Advisor

Email address with &

We have customer who have the caracter "&" in their email address. When we want to send an email to those customer but we got the following message:%MAIL-E-USERSPEC, invalid user specification

Is there a woraround ?

thanks
6 REPLIES 6
Joseph Huber_1
Honored Contributor

Re: Email address with &


For VMS-mail: no, such a mail-userid does not work.
(a SET FORWARD/user="special&x" is accepted, but not in SEND.)

For SMTP it should not be a problem, just put the address in string quotes, example:

MAIL> send/noedit/noself
To: smtp%"Special&x"
Subj: test
Enter your message below. Press CTRL/Z when complete, or CTRL/C to quit:
Exit

MAIL>

But without quotes one gets:

MAIL> send/noedit/noself
To: Special&x@x.domain
%MAIL-E-USERSPEC, invalid user specification 'SPECIAL&X@X.DOMAIN'


http://www.mpp.mpg.de/~huber
Wim Van den Wyngaert
Honored Contributor
Solution

Re: Email address with &

mail/subj="test" file "smtp%""wim&wim@brol.be"""

Thus enclosed in double quotes (count them well). Tested it and it works. But thanks to Ruslan R. Laishev and Google.

Wim
Wim
Hoff
Honored Contributor

Re: Email address with &

Can you post some version information?

$ UCX
SHOW VERSION

And can you post an example of the failure (with the username and domain obscured) with the error?

It would not surprise me to learn you can't get this through the default parser, and the selection of an ampersand will cause problems elsewhere; not just with OpenVMS and its MAIL system.

I do not know that any of the following will be accepted through the parser, I'm applying DCL norms for specifying "weird" characters.

As a first pass suggestion here, I'd quote the whole string, I'd then try to selectively quote the user name string, and -- should this fail -- I'd then report it to HP.

smtp%"user&xyz@domain"

You might well need to quote the target string:

smtp%"""user&xyz""@domain"

What's more interesting here, the ampersand character is a DCL substitution character. Stuff after that will see a string substitution attempted, if you enter the character as part of a MAIL command entered at the $ prompt.

There may not be a way to get this username specified. You would then need to have the remote site set up forwarding or an alias, something they will almost certainly need to set up for other systems for this user.

And inquiring minds want to know: does this cut down on the volume of spam?

Stephen Hoffman
HoffmanLabs
Wim Van den Wyngaert
Honored Contributor

Re: Email address with &

Also works : "smtp%""wim&wim""@brol.be".
And even "smtp%wim""&""wim@brol.be".

But the last one was not digested by the Windows mail server. It simply dropped the mail.

Wim
Wim
Denis Michaud
Occasional Advisor

Re: Email address with &

My problem is resolved

Thanks
Steven Schweda
Honored Contributor

Re: Email address with &

> [...] "smtp%""wim&wim@brol.be"""
>
> Thus enclosed in double quotes (count them
> well).

If you can remember _where_ to put them,
remembering how _many_ to use is as easy as
1-2-3.