473,606 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SMTPMail and server reply

Tim
Hi all,

I have a problem with SMTPMail as I want to evaluate the respone of the
server, but unfortunately I could neither on the web nor in the MSDN
find an example of it.

There is no problem with sending the mails, however, I need to find out
whether the server sent an error or said that everything was fine.

The different try... catch examples didn't help me as I a mail with a
non existing recipient wouldn't cause an exception due to its
syntactically correct address - the server would send a reply anyway
which would let me know that the recipient doesn't exist.

Any ideas anyone?

Thank you

Tim

Jan 17 '06 #1
2 1497
Me
You might want to do some research on SMTP also.. A server will probably not
send an error message back when an invalid/incorrect/unknown/etc. email
address is specified. One reason for this is the server may not know if it
is valid or not!

You may be sending an email to a SMTP server called yahoo.com and have a To
address of me @ home.com . Well.. Yahoo.com would not know if that existed
at the time that you sent your email since it is not a direct pass through
from you to the the smtp server to the destination. There is most likely a
queue of some sorts on the SMTP server and your email just gets put into it
and sent after a few seconds.

Another thing to keep in mind is Spam.. If a SMTP server acknowledged if an
address was good/bad then spammers could easily go to every SMTP server out
there and just bombard it with AAAAAAA thru ZZZZZZ and log what addresses
are good/bad and then spam them do death.

Hey.. Your not tring to do that are you? Hmmmmmmmmmm.

"Tim" <go****@superti mmy.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
Hi all,

The different try... catch examples didn't help me as I a mail with a
non existing recipient wouldn't cause an exception due to its
syntactically correct address - the server would send a reply anyway
which would let me know that the recipient doesn't exist.

Jan 17 '06 #2
Tim
Hi again,

I forgot to mention that this is for internal use within our intranet,
so the sender and the recipients would always be in the same domain.

I'm not trying to SPAM anyone, there are enough open SMTP-relays on the
internet that I could use if I wanted to ;-)

The problem still is, that I don't get a response at all, I don't even
know whether it accepted the mail for further delivery...

No chance to get extended info? When I telnet the server and send a
mail manually, I can see the status codes the server replies with.

Best regards

Tim
You might want to do some research on SMTP also.. A server will probably not
send an error message back when an invalid/incorrect/unknown/etc. email
address is specified. One reason for this is the server may not know if it
is valid or not!

You may be sending an email to a SMTP server called yahoo.com and have a To
address of me @ home.com . Well.. Yahoo.com would not know if that existed
at the time that you sent your email since it is not a direct pass through
from you to the the smtp server to the destination. There is most likely a
queue of some sorts on the SMTP server and your email just gets put into it
and sent after a few seconds.

Another thing to keep in mind is Spam.. If a SMTP server acknowledged if an
address was good/bad then spammers could easily go to every SMTP server out
there and just bombard it with AAAAAAA thru ZZZZZZ and log what addresses
are good/bad and then spam them do death.

Hey.. Your not tring to do that are you? Hmmmmmmmmmm.

"Tim" <go****@superti mmy.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
Hi all,

The different try... catch examples didn't help me as I a mail with a
non existing recipient wouldn't cause an exception due to its
syntactically correct address - the server would send a reply anyway
which would let me know that the recipient doesn't exist.


Jan 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
379
by: Jason | last post by:
Hi not sure if this is the write place, but i really need some help with this...! I have a piece of code that sends email using the SmtpMail class, in an ASP.NET web application, with integrated window authentication. it does work, and works fine on my dev machine. it also works fine on the test server, but with some considerations. on the test server, i can send emails IF they do not include any attachments. as soon as i send an email...
9
3868
by: Kevin Spencer | last post by:
We just moved an ASP.Net app to a Windows 2003 Server, and the SMTPMail fails now with the following message: System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object args, Boolean byrefModifiers, Int32 culture, String namedParameters) +0 System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
5
2138
by: ElanKathir | last post by:
Hi ! I wrote one code for Send the E-mail, But that code have some problem , So please help me Here i paste my code and Error: Error: Server Error in '/Elan_Sample' Application. --------------------------------------------------------------------------------
1
2693
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect. I think it is a relay issue. Our system administrator will not allow relaying. In the ASP.Net web.config file I let the web application...
3
9249
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect. I think it is a relay issue. Our system administrator will not allow relaying. In the ASP.Net web.config file I let the web application...
2
1831
by: kmbarz | last post by:
I'm trying to expand my horizons here by working through an ASP.Net book. When I do the example that uses: Line 55: Mail.From = "feedback@graymad.com" Line 56: SmtpMail.SmtpServer = "localhost" Line 57: SmtpMail.Send(Mail) I get: myemail@comcast.net
9
1849
by: Russell Stevens | last post by:
I generate pdf files on my server and allow users to access them via a browser and also email them. Most files work fine whether the user uses his browser or gets an email with a pdf attachment which he can then open with Acrobat. All my pdf files work fine via a browser, but some are corrupted by one byte when sent as an email attachment. The problem is 100% reproducible - the code is trivial. Am I missing something obvious or is this a...
1
954
by: Terry Olsen | last post by:
Evidently the SmtpMail class doesn't throw an exception when the SMTP server returns an error? It just lets you happily think the email was sent when actually it was rejected by the SMTP server. I found this out by having my app connect to DevNull's Dummy SMTP server. Seems I was sending just the @domain part of the "FROM" address. Correcting that got my emails going. Now, how do I get the From to display a friendly name instead of my...
14
9122
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my local default SMTP Server and my from address is a valid Yahoo/Hotmail address. I have configures the local SMTP Server to allow the IP Address 127.0.0.1.
0
8432
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8428
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8078
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6753
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5962
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5456
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2442
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1548
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1285
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.