473,706 Members | 7,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

accessing the delivery receipt using CDO.Message

Helo,

I am using myMail.DSNOptio ns = 14 n a script that uses CDO.Message to
send an internal mail. Is there a way to access the delivery status in
the same script and report a bad route...below is an example I would
like to achieve. Any help is greatly appreciated.

Example:
Sub sendMail(msg)
Set myMail=CreateOb ject("CDO.Messa ge")
myMail.Subject= "Queues|Critica l"
myMail.From="Ex ****@us.panason ic.com"
myMail.To="sa** *****@in.ibm.co m"
myMail.TextBody =msg
myMail.DSNOptio ns = 14
myMail.Send
set myMail=nothing

<----------------------------If message not delivered Wscript.echo
"mesage not delivered" else "great job" end if ------------->

End Sub

Jun 20 '07 #1
2 6930
Sany wrote on Wed, 20 Jun 2007 07:48:58 -0700:
Helo,

I am using myMail.DSNOptio ns = 14 n a script that uses CDO.Message to
send an internal mail. Is there a way to access the delivery status in
the same script and report a bad route...below is an example I would
like to achieve. Any help is greatly appreciated.

Example:

Sub sendMail(msg)
Set myMail=CreateOb ject("CDO.Messa ge")
myMail.Subject= "Queues|Critica l"
myMail.From="Ex ****@us.panason ic.com"
myMail.To="sa** *****@in.ibm.co m"
myMail.TextBody =msg
myMail.DSNOptio ns = 14
myMail.Send
set myMail=nothing

<----------------------------If message not delivered Wscript.echo
"mesage not delivered" else "great job" end if ------------->

End Sub
Given that the delivery receipt might not be received for minutes, hours.,
days, etc after sending, if at all, this isn't a simple thing to accomplish.
Also, a DSN is returned to the From address as an email - this means that
you'd need to poll the POP3/IMAP account for that address looking for the
DSN in order to show the status.

What you might be able to achieve is if you can connect to the recipient's
SMTP server and get an immediate response (ie an error from the Send method)
which would indicate if the account exists or not. It won't always work (for
example, the recipient server might be a simple relay that doesn't validate
the existence of addresses during the SMTP conversation), but as you say
you're sending these internally then this might well be the solution you're
looking for.

Dan
Jun 21 '07 #2

"Daniel Crichton" <ms****@worldof spack.comwrote in message
news:ut******** ******@TK2MSFTN GP05.phx.gbl...
Sany wrote on Wed, 20 Jun 2007 07:48:58 -0700:
Helo,

I am using myMail.DSNOptio ns = 14 n a script that uses CDO.Message to
send an internal mail. Is there a way to access the delivery status in
the same script and report a bad route...below is an example I would
like to achieve. Any help is greatly appreciated.

Example:

Sub sendMail(msg)
Set myMail=CreateOb ject("CDO.Messa ge")
myMail.Subject= "Queues|Critica l"
myMail.From="Ex ****@us.panason ic.com"
myMail.To="sa** *****@in.ibm.co m"
myMail.TextBody =msg
myMail.DSNOptio ns = 14
myMail.Send
set myMail=nothing

<----------------------------If message not delivered Wscript.echo
"mesage not delivered" else "great job" end if ------------->

End Sub

Given that the delivery receipt might not be received for minutes, hours.,
days, etc after sending, if at all, this isn't a simple thing to
accomplish.
Also, a DSN is returned to the From address as an email - this means that
you'd need to poll the POP3/IMAP account for that address looking for the
DSN in order to show the status.
An alternative address for the disposition note to be sent to can be set
using:-

myMail.Fields(" urn:schemas:mai lheader:disposi tion-notification-to") =
"wa*******@serv ermail.mydomain .com"
myMail.Fields.U pdate

Add a "servermail " mail domain (which allows relays only from local addesses
and doesn't foward) to a local SMTP server (I typically have one installed
on the same server as my ASP is running). Make sure the local DNS service
has a MX record for it.

Now the dispostion notes end up as *.eml files in the servers drop folder.
This can be polled for eml files and the notes can then be consumed. Of
course this is still an asynchronous process.


Jun 21 '07 #3

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

Similar topics

0
1674
by: Dica | last post by:
i think i've gotten the wrong idea about the differences between a read receipt and delivery status notificaiton. i was assuming that delivery status notificaiton is a response line from the remote smtp server that would be added to the originatoring smtp server's log file. but that's not it, is it? delivery status notification means an email is generated and sent to the recipient's email box, correct?
2
2210
by: lpw | last post by:
I have dilligently reviewed FAQ-lite Section 3.2, "How do I pass a pointer-to-member-function to a signal handler, X event callback, system call that starts a thread/task, etc." The only suggestion on how to deliver a signal to an object is to do it via a global variable and a wrapper function, a technique that is generally a Bad Idea (due to the usage of a global variable). I understand that this ng is dedicated to the discussion of...
5
5411
by: Chris Thunell | last post by:
I'm using the system.web.mail in vb.net to send emails out in a vb.net application. The sending of emails works great. Is there a way to have it send me back a delivery receipt or a read receipt? (I think i prefer delivery receipt) Any help would be greatly appreciated! Chris Thunell cthunell@pierceassociates.com mycode currently is the following:
0
1903
by: Kostadin Kostov | last post by:
Hi! I'm developing component for sending emails and want to have the ability to request delivery receipt when sending an email. I use the "Return-Receipt-To" header: myMessage.Headers.Add("Return-Receipt-To", "me@something.com"); It successfully adds the header to the email, but for some reason I don't get delivery receipt. And when I send email with Outlook and request delivery receipt, I get it and the header of the mail is almost...
2
12172
by: Gregory PiŮero | last post by:
Hi Guys, Does anyone know how to program a Python script to send out emails with a request delivery receipt? Is it something I can build into the email message via the mime stuff? And yes, I know it's probably a bad idea, but I can't talk my clients out of it ;-) --
1
9543
by: hasanainf | last post by:
Hi all and thanking you all in advance for your help My client wants to use a receipt printer. Since I have never used one before I have some questions. 1. Unlike other printers which are set by default to print a whole A4 size page, I want the receipt printer to print an unlimited lenght of receipt, that is to say that if five items are sold, the receipt printer should print company details with five items and a total figure and stop...
0
1217
by: Baspad | last post by:
Hi... I want this topic is very urgent. can you help me.... How do access the delivery confirmation using CDONTS.NEWMAIL....
1
5330
by: brunovg | last post by:
Hello, There's any way to configure a CDO.Message object to set the read and delivery receipt option, in C#? I already tried: CDO.Message msg = new CDO.Message(); .... msg.Fields.Value =
7
6047
by: ARC | last post by:
Hello all, What's the proper paper size setting if you want to do a receipt printer report, that's a continuous form? I don't really see an option for a continuous paper size. Thanks! Andy
0
8778
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8693
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9044
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
8986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5935
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();...
0
4707
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3141
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
2
2497
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2087
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.