Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

"+" character in e-mail address

"+" character in e-mail address

TCPIP V5.6 doesn't like e-mail addresses
of the form +@.
Of course, I have need to send an e-mail
to such an address. Is there a way to
get MAIL to send email to such an address?
Looking at other similar topics here, I tried
SMTP%"
" but that didn't help.
13 REPLIES
Jim_McKinney
Honored Contributor

Re: "+" character in e-mail address

The backslash ("\") character is frequently used to as an escape for special characters in SMTP addresses. I've not had experience with the "+" but you might try replacing it with "\+". fwiw...
John Gillings
Honored Contributor

Re: "+" character in e-mail address

Gareth,

I think I remember battling with this issue a while back and not finding any solution when trying to use the MAIL utility directly. No amount of quoting or DCL substitution tricks would get around it.

My solution was to use the SFF utility - SYS$SYSTEM:TCPIP$SMTP_SFF "Send From File", instead of MAIL. In a nutshell, you construct a file containing the appropriate SMTP tags then feed it to SYS$SYSTEM:TCPIP$SMTP_SFF. See TCPIP documentation for details.
A crucible of informative mistakes
P Muralidhar Kini
Honored Contributor

Re: "+" character in e-mail address

Hi Gareth,

>> Is there a way to get MAIL to send email to such an address?
As Jim has already pointed out, try using a backslash (\) as escape character
in your smtp address and check whether solves the problem.
something like -
\+@

Check the following link for a similar requirement -
http://h71000.www7.hp.com/wizard/wiz_7453.html

In case the above does not work, then you may consider using the SMTP SFF
utility as recommended by John.

Also,
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1273904109132+28353475&threadId=1409779

For using SMTP SFF, refer
http://h71000.www7.hp.com/doc/732final/6525/6525pro_016.html
-> 5.9 SMTP SFF (Send From File)

Hope this helps.

Regards,
Murali
Let There Be Rock - AC/DC

Re: "+" character in e-mail address

Thanks for the suggestions.

Using the SMTP_SFF route isn't really an
option as this problem address is just one
of many e-mail recipients for a single
message. Treating one address differently
would be unwieldy.

I tried the \+ approach but got the
error message MAIL-E-USERSPEC, invalid
user specification '\'.

Gareth
John McL
Trusted Contributor

Re: "+" character in e-mail address

A workaround might be to set up another "normal" email address for the user, on some system that will send to an address with an embedded "+", and have that new address just do an automatic forward.

It's not nice, but then embedding a "+" in addresses isn't nice either. This should give you a temporary fix while you try other options.
Shriniketan Bhagwat
Trusted Contributor

Re: "+" character in e-mail address

Hi Gareth,

Try putting in the mail transport explicitly. For example: SMTP%"+@â

Hope this helps.

Regards,
Ketan
Shriniketan Bhagwat
Trusted Contributor

Re: "+" character in e-mail address

Hi Gareth,

>> MAIL-E-USERSPEC, invalid user specification '\'.
Looks like what you specified is an invalid user name. Please check the below link.

http://h71000.www7.hp.com/wizard/wiz_4849.html

One more thing to try is to define a logical name for the address and then use this in the mail.
For Example:

$ define my_mail "+@"
$ mail
send
TO: my_mail

Hope this solves the problem.

Regards,
Ketan
P Muralidhar Kini
Honored Contributor

Re: "+" character in e-mail address

Hi Gareth,

Check the following link for a discussion on a similar problem -
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1276062168886+28353475&threadId=371246

Here the logial method did not work but using the SMTP%"
" did
solve the problem. You might have already encountered this link in ITRC.

>> I tried SMTP%"
" but that didn't help
Did you try SMTP%"+@" ?

you may also want to put a backslash (\) in the above SMTP... and try.

I am starting to think whether the character "+" is supported in the address
or not. May be thats why the SMPT%... is failing.

Regards,
Murali
Let There Be Rock - AC/DC
Shriniketan Bhagwat
Trusted Contributor

Re: "+" character in e-mail address

Hi Gareth,

Below is the explanation for one of the cause for MAIL-E-USERSPEC error. Please check the user action for using the special symbol in the mailing address.

%MAIL-E-USERSPEC, invalid user specification address

Component: SMTP

Meaning: Attempts to send mail in the following format fail:
"IGW::PSI%ESX25NET.IHEPVX::USER"@host

Action: Use the following format instead:
SMTP%"'igw::psi%esx25net.ihepvx::USER'@host"

For more information refer the below link:
http://starlet.deltatel.ru/help?key=TCPWARE~Messages~SMTP&title=VMS%20Help&referer='


Regards,
Ketan
Andy Bustamante
Honored Contributor

Re: "+" character in e-mail address

A note for John McL, the + in smtp addresses is part of the RFC 5233 for smtp Sieve Filtering.

Logging a case with HP would be the recommendation with a reference to this RFC.
If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
John Gillings
Honored Contributor

Re: "+" character in e-mail address

>Treating one address differently
>would be unwieldy.

Think about what you're trying to do. You just need to send mail to a specific set of addresses. MAIL is one potential utility to complete that task, SFF is another.

You don't need to treat one address differently, if MAIL doesn't work, switch to SFF. Just put the whole distribution list into the same SFF script. All are treated the same.

MAIL was not (originally) designed to deal with SMTP addresses. It has some hacks which help it deal with them, most of the time, but there are still some things it just can't handle (like "+" and "'" in addresses).

MAIL is also an interactive utility which can be cumbersome to invoke from a command procedure.

SFF is designed to be scripted and can deal with the special cases you're having trouble with. It's simply an issue of using the most appropriate tool for the task.
A crucible of informative mistakes

Re: "+" character in e-mail address

Since there doesn't seem to be a way
to handle this with MAIL, I'll bug HP
about it.
John Gillings
Honored Contributor

Re: "+" character in e-mail address

Gareth,

Good luck!

Consider, IFF HP accept the report as a bug, and agree to fix the MAIL utility, you'll still be (at best) several months away from getting anything you can actually use to solve your immediate problem.
A crucible of informative mistakes