Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Problems sending EMail with ASP.Net


Message #1 by "Hugh McLaughlin" <hugh@k...> on Thu, 7 Nov 2002 00:45:52
Hello Everyone and thanks for your help in advance.  I have written an 
ASP.Net page that reads through a set of records, sending emails to each 
recipient.  It has actually been working fine until I tried to run it 
recently when I received the error message:

System.Runtime.InteropServices.COMException: The server rejected one or 
more recipient addresses. The server response was: 501 5.5.4 Invalid 
Address 

My first thought was to check to see if I was handling NULL values 
properly, but I have included in my query to not return records where the 
Email field is NULL.  I have also made the send conditional on checking 
the email address for spaces, thus send only if Trin(MyReader
("EmailAddress")<>"".  I am really not sure where to look to troubleshoot 
this further.  Any help would be greatly appreciated.  Thanks.
Message #2 by "Rich K" <rich@r...> on Wed, 6 Nov 2002 20:41:51 -0500
You might won't to put your code in a try catch close and write the email
address to a log file if there are errors. This will atleast tell you what
email address is causing the problem. Just a thought rich

-----Original Message-----
From: Hugh McLaughlin [mailto:hugh@k...]
Sent: Thursday, November 07, 2002 12:46 AM
To: ASP.NET
Subject: [aspx] Problems sending EMail with ASP.Net


Hello Everyone and thanks for your help in advance.  I have written an
ASP.Net page that reads through a set of records, sending emails to each
recipient.  It has actually been working fine until I tried to run it
recently when I received the error message:

System.Runtime.InteropServices.COMException: The server rejected one or
more recipient addresses. The server response was: 501 5.5.4 Invalid
Address

My first thought was to check to see if I was handling NULL values
properly, but I have included in my query to not return records where the
Email field is NULL.  I have also made the send conditional on checking
the email address for spaces, thus send only if Trin(MyReader
("EmailAddress")<>"".  I am really not sure where to look to troubleshoot
this further.  Any help would be greatly appreciated.  Thanks.

Message #3 by "Hugh McLaughlin" <hugh@k...> on Thu, 7 Nov 2002 03:36:09
Thanks for the excellent idea.  I did this and figured out that it was an 
email address where the @ was not input.  This raises several questions as 
to what and how to validate when running through an email database.  Any 
ideas out there in .Net land?
> 
You might won't to put your code in a try catch close and write the email
address to a log file if there are errors. This will atleast tell you what
email address is causing the problem. Just a thought rich

-----Original Message-----
From: Hugh McLaughlin [mailto:hugh@k...]
Sent: Thursday, November 07, 2002 12:46 AM
To: ASP.NET
Subject: [aspx] Problems sending EMail with ASP.Net


Hello Everyone and thanks for your help in advance.  I have written an
ASP.Net page that reads through a set of records, sending emails to each
recipient.  It has actually been working fine until I tried to run it
recently when I received the error message:

System.Runtime.InteropServices.COMException: The server rejected one or
more recipient addresses. The server response was: 501 5.5.4 Invalid
Address

My first thought was to check to see if I was handling NULL values
properly, but I have included in my query to not return records where the
Email field is NULL.  I have also made the send conditional on checking
the email address for spaces, thus send only if Trin(MyReader
("EmailAddress")<>"".  I am really not sure where to look to troubleshoot
this further.  Any help would be greatly appreciated.  Thanks.


  Return to Index