Dundas Mailer

Hi

I have been trying to use Dundas Mailer component to validate email address on a form. But each time the code is run the login box always pops up requesting username and password.

When I run on my machine it works find.

Here is my code:

objMailer = Server.CreateObject(“Dundas.Mailer”)

    errNum = objMailer.ValidateAddress(txtEmail.Value)

    If errNum = 0 Then

        lblValidEmail.Text = "Valid"
    Else

        lblValidEmail.Text = "InValid"

    End If
    objMailer = Nothing

Cna anybody help me?

hi,

registered especially to answer your question… I was looking for the answer myself, could not find it anywhere, so after a bit of playing and reading the error messages I discovered the right syntax.

don’t mind the rest, added for my own use:

<%
dim objMailer
dim errNum

Set objMailer = Server.CreateObject(“Dundas.Mailer”) 'Mailer object

errNum = objMailer.ValidateAddress(“[email protected]”)

If errNum = 0 Then

tempstr = “Valid”
Else

tempstr = “InValid”

End If
response.write tempstr&“

response.write “error code: “&errNum&” look up the error code below

%>


One (1): The specified address was empty.


Two (2): The specified address was too large.


Three (3): The SMTP send operation failed.


Four (4): The specified user was not found.


Five (5): The MX record was not found.


Six (6): The address validation operation failed.