Coldbox 3.1 - Won't send mail.

I now get the following error when I try to send mail using the MailService plugin. Any ideas about what could be going on?

Error sending mail. Attribute validation error for the mail tag. : The tag does not have an attribute called Mailparts. The valid attribute(s) are query, startrow, group, groupcasesensitive, maxrows, remove, server, port, from, subject, timeout, to, cc, bcc, replyTo, failTo, type, mimeattach, mailerid, priority, spoolenable, wrapText, username, password, useTLS, useSSL, debug, charset, sign, keystore, keyalias, keystorePassword, keyPassword. :

Thanks!

code sample would be helpful, I am sure everyone will agree that the mail service is working for them.

This simple code:

mailService = getPlugin(“MailService”);

mail = MailService.newMail();
mail.setFrom(“my@domain.com”);
mail.setTo(“somebody@domain.com”);
mail.setSubject(“A test subject”);
mail.setBody(“some body text”);

xxx = mailService.send(mail);
writedump(xxx);

produces this error:

Error sending mail. Attribute validation error for the mail tag. : The tag does not have an attribute called Mailparts. The valid attribute(s) are query, startrow, group, groupcasesensitive, maxrows, remove, server, port, from, subject, timeout, to, cc, bcc, replyTo, failTo, type, mimeattach, mailerid, priority, spoolenable, wrapText, username, password, useTLS, useSSL, debug, charset, sign, keystore, keyalias, keystorePassword, keyPassword. : coldfusion.compiler.TagAttributeNotFoundException: Attribute validation error for the mail tag. at coldfusion.tagext.GenericTag._setArguments(GenericTag.java:526) at cfCFMailProtocol2ecfc339792590$funcMAILNORMAL.runFunction(C:\websites\xxx\www\coldbox\system\core\mail\protocols\CFMailProtocol.cfc:66) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582) at cfCFMailProtocol2ecfc339792590$funcSEND.runFunction(C:\websites\xxx\www\coldbox\system\core\mail\protocols\CFMailProtocol.cfc:40) at …

I believe that the mail service used to work… and I don’t know what has changed. I was hoping that somebody else recognized this issue.

Could I be missing some required setting for this site?

Thanks for your help!

What version of ColdBox, which version of ColdFusion or Railo are you using?

CF 9.01, I believe it is Coldbox 3.0.0

Ok, and is there anything in the ColdBox.cfc in the config directory that is setting anything for the mailservice?

No. Is that required?

No it is not, I just wanted to find out if there might be something else changing the defaults. What if you did this instead, would you get the same issue?

var mail = mailservice.newMail(to=“somebody@domain.com”,
from=“my@domain.com”,
subject=“A test subject”,
type=“html”);
mail.setBody( “some body text” );
xxx = mailService.send(mail);
writedump(xxx);

Yes. I get the exact same error. By the way, using CFMAIL works fine.

Error sending mail. Attribute validation error for the mail tag. : The tag does not have an attribute called Mailparts. The valid attribute(s) are query, startrow, group, groupcasesensitive, maxrows, remove, server, port, from, subject, timeout, to, cc, bcc, replyTo, failTo, type, mimeattach, mailerid, priority, spoolenable, wrapText, username, password, useTLS, useSSL, debug, charset, sign, keystore, keyalias, keystorePassword, keyPassword. : coldfusion.compiler.TagAttributeNotFoundException: Attribute validation error for the mail tag. at coldfusion.tagext.GenericTag._setArguments(GenericTag.java:526) at cfCFMailProtocol2ecfc339792590$funcMAILNORMAL.runFunction(C:\websites\xxx\www\coldbox\system\core\mail\protocols\CFMailProtocol.cfc:66) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582) at cfCFMailProtocol2ecfc339792590$funcSEND.runFunction(C:\websites\xxx\www\coldbox\system\core\mail\protocols\CFMailProtocol.cfc:40) at …

Ok that is very weird, that is the code that I use. Although that is ColdBox 3.5 though.

By the way is there any reason you don’t do this?

property name=“mailService” inject=“coldbox:plugin:MailService”;

This is a live site so I set up a quick test page that I could use to run very a simple tests. The actual site code looks just like the code you sent.

Upgrading the Coldbox produced some site errors. I was hoping not to have to go down that road – I have other stuff I need to be working on – but it doesn’t look like I have a choice.

Thank you for your help!

Luis, may need to pipe in here. But I don’t think that the mailservice has changed since CB3.0, so are you saying that CB3.5 works with that code?

I do not know. I haven’t tried it yet, but before I go further, I thought it would be best to update everything to the most recent version.

PS - I ended up fixing my issue by just using the Coldfusion mail tag – it was the fastest solution. I’ll revisit this again when I have time or am working on the next site that uses my CMS.

HI All,

I think this issue is also with ColdFusion “10,0,10,284825” with updater Level “10” …

Thanks

Based on the error it’s look like your jumping out of the mailservice and jumping directly to Coldfusion’s mail tag directly rather than letting the mailservice assemble the object for you. Maybe with new mail() or something similar.