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

CFMail on CF 9 failing with "Empty Address"

Contributor ,
Jan 29, 2010 Jan 29, 2010

Hi all,

upgraded to CF9 this week from 8 and have just seen that most of the emails are failing with an "Empty Address" error.

A quick test shows that it's the FROM that is causing the problem.

An email with this works fine

<cfmail to="fred.bloggs@bloggs.com" from="jo.bloggs@bloggs.com" replyto="jo.bloggs@bloggs.com" subject="xxx"  >

But this fails...

<cfmail to="fred.bloggs@bloggs.com" from="Jo Bloggs" replyto="jo.bloggs@bloggs.com" subject="xxx"  >

CF8 liked this and the cfmail reference for CF9 says "This attribute does not have to be a valid Internet address; it can be any text string."

So why is it failing!?

I've loads of applications that email from the App name with notifications and don't have an email address, so this is critical.

HELP!

Thanks

Phil

3.0K
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
Guide ,
Jan 29, 2010 Jan 29, 2010

I'd suspect it's due to people having tighter spam controls than they used to - "Joe Bloggs" is simply not a valid from address so would get caught by most email filters.

Adobe are obviously tightening up on this (and helping you out by doing so) and now insist on a valid email address, which I'm surprised they never insisted on before.

I'd say it's global search and replace time, because I can't see how you'd ever get round that.

O.

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
Contributor ,
Jan 29, 2010 Jan 29, 2010

Even though there own documentation says otherwise?!

I

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
Guide ,
Jan 29, 2010 Jan 29, 2010

Well, I haven't tested it but if you say so, then yes!

You're not the first person to spot differences between the documentation and the real world, and sadly you won't be the last. Even if you log it as a bug with Adobe (which incidentally I can't see them fixing, as you're asking them to *remove* sensible validation) all they'd do it update the documentation.

You'll need to find a solution that works for you and update your code unfortunately, so is the fun of upgrading software.

O.

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
Contributor ,
Jan 29, 2010 Jan 29, 2010

Quick update...

I can get it to work if the From is a single work, ie from="JoBloggs" but as soon as there is a space it fails....

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 ,
Jan 29, 2010 Jan 29, 2010
LATEST

It could be that Adobe are falling into that trap for young players that is "validating the email address".  A lot of people validate for a specific sequence of valid chars, dots, at symbols, and that sort of nonsense; whereas if one reads the RFC, anything is valid on the LHS of the @ symbol (as long as it's quoted and internal quotes are escaped, or something), so trying to validate it is just a fool's errand. And, equally, there is no requirement for the domain name to be specified anyhow.

If you can lose the mailto bit and the email will send in CF8, and if it fails in CF9, you should log a bug report with them.

--

Adam

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 ,
Jan 29, 2010 Jan 29, 2010

I reckon lose the "mailto:" nonsense.  That's an HTTP conceit, which only has relevance in an HTTP situation (eg, in a link in an anchor tag in an HTML doc).  The to/from/etc field when sending an email is expecting an email address (conforming to whatever the appropriate RFC is).

If what you demonstrated in your code worked in CF8, that was just CF8 being lenient: I guess CF9 is now validating the string sent to the mailer, which probably almost counts as a regression bug?  Either way, having "mailto:" in there was always inappropriate, whether it worked or not.

--

Adam

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
Contributor ,
Jan 29, 2010 Jan 29, 2010

I can get round it by using From="Jo Bloggs <blah.blah@blah.com>" but will need to trawl through all my apps and add in a "real email address" as well - our admin team will be happy as I'll need to use their generic one!

They are all internal company applications, hence the lack of requirement for a true email - the email comes from the app to alert of any updates, linking the user back to the app.

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
Contributor ,
Jan 29, 2010 Jan 29, 2010

Thinking about it, the idea that they have tightened the restrictions on this makes no sense if you can still send from a single word name, eg FROM="BarneyRubble"...

I suspect a bug is more likely...

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