SmtpClient How to detect if its a valid email or not

E

Edgard Guilherme

Hello all,
b4 anything, i am using iis smtp to send the emails..


is there anyway to detect if the "To" email is a valid one ?

Like for eg. To = (e-mail address removed) (so this email of course doesnt
exist, but is there anyway to detect that ?, or if the email exist but the
inbox is full etc..)

i know that if i set the delivery method to pickup from iis and the email
fails, it ill drop it in the badmail folder, but i dont think that is nice..
is there any other way to detect any errors when the email was sent besides
checking the badmail folder ?

Thx in advance...
 
J

Jeff Dillon

What do you plan to do if their inbox is full?

Don't most SMTP installs allow you to specify an "admin"/bounce account
where you get notified of delivery errors?

Jeff
 
E

Edgard Guilherme

well if inbox is full, i would but that email to that person on hold, and
would try again in a few hours, and if the email doesnt exist i would set
that the client would not receive any more emails. well i can set an email
to delivery on error, but isnt it possible to detect such errors at the
moment of send ?

Like

try
{
SmtpClient.Send(msg)
}
catch(Exception ex)
{
//and for eg. i could get such errors here
}

is such thing possible ?
 
J

Jeff Dillon

How can you tell if an inbox is full, until you send a message, and get the
response?

I don't think a full inbox or an invalid email raises a runtime exception.

My suggestion is to monitor that admin/bounce account

You aren't sending spam, are you?
 
E

Edgard Guilherme

its a kind of newsletter that users choose to receive or not when
registering not spam =D,

but my boss wants this kind of feature, so i guess my only option is to
monitor the email as you said, altho it ll be a little more difficult..
 
B

bruce barker

unfortunately due to spam, this feature no longer exists. you used to a
bounce message, that the email addrss was invalid, but most mail host no
longer supply this. (the spammer would just hit mail servers with generated
names, and knock out bounces from the list).

the most common approach, is when someone signs up for mail, you send a
validation email to them, that they reply from (often at signup).


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,255
Latest member
TopCryptoTwitterChannels

Latest Threads

Top