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

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

Explorer ,
Dec 06, 2018 Dec 06, 2018

Copy link to clipboard

Copied

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

Views

3.0K

Translate

Translate

Report

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.

Votes

Translate

Translate
LEGEND ,
Dec 06, 2018 Dec 06, 2018

Copy link to clipboard

Copied

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

HTH,

^ _ ^

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

The error I provided IS from mail log

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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,

^ _ ^

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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,

^ _ ^

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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,

^ _ ^

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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)

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hi Eugene,

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Documentation