473,800 Members | 2,640 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 6933
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
1678
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
2212
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
5422
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
1904
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
12208
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
9559
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
1220
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
5333
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
6065
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
9690
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
9551
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,...
0
10504
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
10274
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
10251
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
10033
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
9085
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 project—planning, coding, testing, and deployment—without 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...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.