cfmail server attribute fails when username contains @

Description

<cfmail server="user@domain.comassword@smtpout.europe.secureserver.net:3535" .....>
This will fail
</cfmail>

_lucee.runtime.exp.NativeException: cannot cast [password@smtpout.europe.secureserver.net:3535] string to a number value
at lucee.runtime.net.smtp.SMTPClient.toServerImpl(SMTPClient.java:213)
at lucee.runtime.net.smtp.SMTPClient._send(SMTPClient.java:741)
at lucee.runtime.net.smtp.SMTPClient.send(SMTPClient.java:714)_

I'm specifying username, port and password via server attribute as in [userassword@]server[ort]. The problem here is thatt my email server login contains @ since it's email address (often the case). In code example above when i change user@domain.com to userdomain.com i get smtp authentication failed error - as expected. I'm guessing Lucee is tokenizing/parsing the server string assuming there is no [@] in username nor password. BTW the code above works fine in CF 7+

Environment

None

Activity

Show:
Eric Twilegar
August 23, 2016, 4:20 AM

have you tried specify it like user%40domain.comassword@smtpout.europe.secureserver.net:3535.

%40 is the URL encoded version of @. According to http://www.ietf.org/rfc/rfc1738.txt the syntax might require any [:,@,.] etc to be encoded.

Assignee

Michael Offner

Reporter

Daniel

Priority

Minor

Labels

Fix versions

None

Affects versions

Configure