Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

November 15, 2007

VerifyRecipients - Verify SMTP Email Addresses

These examples demonstrate the mailman object’s VerifyRecipients method:

ASP: Verify Email Addresses with VerifyRecipients
SQL Server: Verify Email Addresses with VerifyRecipients
C#: Verify Email Addresses with VerifyRecipients
C++: Verify Email Addresses with VerifyRecipients
Delphi: Verify Email Addresses with VerifyRecipients
Visual FoxPro: Verify Email Addresses with VerifyRecipients
Java: Verify Email Addresses with VerifyRecipients
Perl: Verify Email Addresses with VerifyRecipients
Python: Verify Email Addresses with VerifyRecipients
Ruby: Verify Email Addresses with VerifyRecipients
VB.NET: Verify Email Addresses with VerifyRecipients
Visual Basic: Verify Email Addresses with VerifyRecipients
VBScript: Verify Email Addresses with VerifyRecipients

Important: SMTP servers may respond differently when a bad email address is encounted. Here are logs for both mail.chilkatsoft.com and smtp.comcast.net. You can see that the comcast.net server responds with a "550 5.1.1 Not our customer" error, but continues to accept additional recipients. However, the chilkatsoft.com mail server aborts after the 1st bad email address is encountered, and this causes the VerifyRecipients method to fail.

Also, a mail server can only verify the recipients local to it’s domain. For example, comcast.net can only verify comcast.net email addresses, and chilkatsoft.com can only verify chilkatsoft.com email addresses. Any non-local email addresses are assumed to be valid. SMTP servers relay these to the destination mail servers, and if the email is invalid at that point, a bounce notification (DSN) may be generated…

220 OMTA12.emeryville.ca.mail.comcast.net comcast ESMTP server ready
250-OMTA12.emeryville.ca.mail.comcast.net hello [***.***.***.***], pleased to meet you
250-HELP
250-AUTH LOGIN PLAIN CRAM-MD5
250-SIZE 15728640
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-STARTTLS
250 OK
MAIL FROM:<support@chilkatsoft.com>
250 2.1.0 <support@chilkatsoft.com> sender ok
RCPT TO:<a_real_person@comcast.net>
250 2.1.5 <a_real_person@comcast.net> recipient ok
RCPT TO:<doesNotExist7434@comcast.net>
<strong>550 5.1.1 Not our Customer</strong>
RCPT TO:<admin@chilkatsoft.com>
250 2.1.5 <admin@chilkatsoft.com> recipient ok
RCPT TO:<doesNotExist@chilkatsoft.com>
250 2.1.5 <doesnotexist@chilkatsoft.com> recipient ok
RCPT TO:<DoesNotExist7213@gmail.com>
250 2.1.5 <doesnotexist7213@gmail.com> recipient ok
RCPT TO:<chilkat.support@gmail.com>
250 2.1.5 <chilkat.support@gmail.com> recipient ok

Here is the chilkatsoft.com LastErrorText. You can see that this mail server aborts after the 1st invalid email address:

ChilkatLog:
  VerifyRecipients:
    DllDate: Nov 14 2007
    Username: Chilkat
    Component: Ruby
    SMTP_Connect:
      Connecting to SMTP server mail.chilkatsoft.com:25
      smtp_host: mail.chilkatsoft.com
      smtp_port: 25
      smtp_user: admin@chilkatsoft.com
      InitialResponse: 220 xmail02.myhosting.com ESMTP  648143d3667b3045487bb901
cdbbf649
	
      sendingHello: EHLO CK2007
	
      helloResponse: 250-xmail02.myhosting.com
250-PIPELINING
250-SIZE 100000000
250-DATAZ
250-AUTH LOGIN PLAIN
250 8BITMIME
	
      login_method: LOGIN
      CONNECTED to ESMTP server mail.chilkatsoft.com:25
    recipients:
      to: a_real_person@comcast.net
      to: doesNotExist7434@comcast.net
      to: admin@chilkatsoft.com
<strong>      554 Sorry, no mailbox here by that name. (#5.1.1)
      Failed when sending RCPT TO:<doesNotExist@chilkatsoft.com>
      bad_address: doesNotExist@chilkatsoft.com
      Connection closed by server.</strong>
      Socket is no longer readable
      Failed to get SMTP command response…

This blog post provides more information about validating email addresses:
Validating an Email Address


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.