The cfloop vs. cfmail query= Java bytecode will be very similar.  There should be no performance penalty, although since you will be doing an extra operation (checking the address column) thing might run a bit slow because you are doing more work.

The validator is the InternetAddress.parse function from JavaMail.

Here is the code:

       InternetAddress[] rs;

        try

        {

            rs = InternetAddress.parse(addr);

        }

        catch (AddressException ex)

        {

            rs = null;

        }

You can find documentation on the InternetAddress class at http://java.sun.com/products/javamail/reference/api/index.html <http://java.sun.com/products/javamail/reference/api/index.html>

Here is a paste of the JavaDoc:

parse

public static InternetAddress <file:///C:\tools\javamail-1.3\docs\javadocs\javax\mail\internet\InternetAddress.html> [] parse(java.lang.String addresslist)
                               throws AddressException <file:///C:\tools\javamail-1.3\docs\javadocs\javax\mail\internet\AddressException.html>

Parse the given comma separated sequence of addresses into InternetAddress objects. Addresses must follow RFC822 syntax.

Parameters:

addresslist - comma separated address strings

Returns:

array of InternetAddress objects

Throws:

AddressException <file:///C:\tools\javamail-1.3\docs\javadocs\javax\mail\internet\AddressException.html>  - if the parse failed



I hope this info helps.

--
Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: Tyler Clendenin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 2:55 PM
To: CF-Talk
Subject: RE: CFMX 'bug'? Easy to crash CFMAIL.

so you see no forseeable performance issue with looping over using the
query?  also does the validator follow all rfc822 standards such as quoted
identifiers.and in clarification, this behavoir is a new "improvement" and
not a bug?

Tyler Clendenin
GSL Solutions

  _____  

From: Tom Jordahl [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 2:34 PM
To: CF-Talk
Subject: RE: CFMX 'bug'? Easy to crash CFMAIL.

> That is my major gripe, why can't these things just work.

Because what to you is 'just working' is to a bunch of other people 'hiding
an import error'.

If you have CFMX 6.1 mail spooling problems, I would look to your mail
server.  I would also report a problem through technical support and maybe
we can fix it for you.

By the way, there is very little functional difference between cfmail
qeuery= and cfloop/cfmail.  If you believe your DB has bad Email addresses
in it, use the loop and validate the addresses.  If you have verified your
data's integrity on entry, use the query= syntax.

I do have an enhancement on my plate to batch bad addresses when running
cfmail over a query.  We know this is a problem many users encounter. We
just have to figure out how the interface would work.  Suggestions?

--
Tom Jordahl
Macromedia Server Development

  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to