Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

javax.mail.internet.AddressException: Empty address in string ``''

Explorer ,
Dec 06, 2018 Dec 06, 2018

Hello all,

CF 2018 Standard on Windows 2016.

Running the following code:

<cfmail to="epipko@unionbay.com" from="mail@cf_server.com" subject="Example email">

  Your Email Message!!!

</cfmail>

Getting the following error in mail log:

javax.mail.internet.AddressException: Empty address in string ``''

If you dealt with this error before, please point me to the right direction to resolve it.

Thanks,

Eugene

3.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 12, 2018 Dec 12, 2018

Still, you gave no answer to my question. To take it further run the following in ColdFusion 2018:

<cfscript>

    writeoutput('isValid("email","mail@cf_server.com"): ' & isValid("email","mail@cf_server.com"));

    writeoutput('<br>');

    writeoutput('isValid("email","mail@cfserver.com"): ' & isValid("email","mail@cfserver.com"));

</cfscript>

The result speaks for itself.

Translate
LEGEND ,
Dec 06, 2018 Dec 06, 2018

Check the mail log in CFAdmin.  If there's an issue, it _should_ be present.

HTH,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 06, 2018 Dec 06, 2018

The error I provided IS from mail log

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 06, 2018 Dec 06, 2018

Are the emails in your sample code the actual emails that you are using?

Are you using variables to supply the from or to addresses?  Or are they hard-coded?  If variables, CFOUTPUT them to the screen and use CFABORT after that just to check.

I cannot think of any situation where CF would strip out the from or to addresses in a CFMAIL tag.

HTH,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 06, 2018 Dec 06, 2018

To email is real, from is not, but it works just fine in my current CF9.

Even if I add server and port, it's not working.

<cfmail to="epipko@unionbay.com" from="mail@cf_server.com" subject="Example email" server="smtp.seattlepacificindustries.com" port="25">

  Your Email Message!!!

</cfmail>

I tried to run it by providing same "real" email address in "to" and "from" and got a different error:

<cfmail to="epipko@unionbay.com" from="epipko@unionbay.com" subject="Example email" server="smtp.seattlepacificindustries.com" port="25">

  Your Email Message!!!

</cfmail>

Error:

com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.1 Client was not authenticated

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 06, 2018 Dec 06, 2018

Client was not authenticated.  No relays.  Must be a valid, existing email address.

My guess is that something, somewhere, is stripping out mail@cf_server.com from the FROM attribute.  Or the email server doesn't like it.  But it should be a valid, existing sender email address.

V/r,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 06, 2018 Dec 06, 2018

I am running this in CF9 just fine

<cfmail to="epipko@unionbay.com" from="mail@cf_server.com" subject="Example email">

  Your Email Message!!!

</cfmail>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 07, 2018 Dec 07, 2018

If it works in CF9, it's a bug.  It should not have worked in CF9.

Have any changes been made to the mail server that this is going through?  Without a valid existing email address as the source, it should not go through; if it does, it allows spoofing, which is a boon to spammers and bad actors wishing to send mass email phishing attacks.  Security 101.

V/r,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 07, 2018 Dec 07, 2018

Eugene, can you confirm it works in 9 if you specify the same server and port atrribute on the cfmail like you showed above? That overrides whatever is in the cf admin mail settings.

If it then does NOT work in cf9, then it tells us that the cf admin mail page settings for server and/or port were not the same in cf9 than in 2018.

Let us know if that's it or not.


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 07, 2018 Dec 07, 2018

Thanks Charlie,

I I ran it in CF9 as:

<cfmail to="epipko@unionbay.com" from="mail@cf_server.com" subject="Example email" server="smtp.seattlepacificindustries.com" port="25">

  Your Email Message!!!

</cfmail>

and received it:

cf9_cfmail.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 12, 2018 Dec 12, 2018

Hi Eugene,

Could it be a bug whereby ColdFusion 2018 stumbles on the underscore character? What happens when you use from="mail@cfserver.com"​ ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 12, 2018 Dec 12, 2018

It works if I specify a valid email address, for instance:

<cfmail to="epipko@unionbay.com" from="epipko@unionbay.com" subject="Example email" server="smtp.seattlepacificindustries.com" port="25"

  Your Email Message!!! 

</cfmail>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 12, 2018 Dec 12, 2018

Still, you gave no answer to my question. To take it further run the following in ColdFusion 2018:

<cfscript>

    writeoutput('isValid("email","mail@cf_server.com"): ' & isValid("email","mail@cf_server.com"));

    writeoutput('<br>');

    writeoutput('isValid("email","mail@cfserver.com"): ' & isValid("email","mail@cfserver.com"));

</cfscript>

The result speaks for itself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 12, 2018 Dec 12, 2018
LATEST

<cfscript>

    writeoutput('isValid("email","mail@cf_server.com"): ' & isValid("email","mail@cf_server.com"));

    writeoutput('<br>');

    writeoutput('isValid("email","mail@cfserver.com"): ' & isValid("email","mail@cfserver.com"));

</cfscript>

produces

isValid("email","mail@cf_server.com"): NO

isValid("email","mail@cfserver.com"): YES

and ... when I run

<cfmail to="epipko@unionbay.com" from="mail@cfserver.com" subject="Example email" server="smtp.seattlepacificindustries.com" port="25">

  Your Email Message!!!

</cfmail>

I am getting email !!!

cf2018_email.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources