473,508 Members | 2,365 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.DSNOptions = 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=CreateObject("CDO.Message")
myMail.Subject="Queues|Critical"
myMail.From="Ex****@us.panasonic.com"
myMail.To="sa*******@in.ibm.com"
myMail.TextBody=msg
myMail.DSNOptions = 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 6907
Sany wrote on Wed, 20 Jun 2007 07:48:58 -0700:
Helo,

I am using myMail.DSNOptions = 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=CreateObject("CDO.Message")
myMail.Subject="Queues|Critical"
myMail.From="Ex****@us.panasonic.com"
myMail.To="sa*******@in.ibm.com"
myMail.TextBody=msg
myMail.DSNOptions = 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****@worldofspack.comwrote in message
news:ut**************@TK2MSFTNGP05.phx.gbl...
Sany wrote on Wed, 20 Jun 2007 07:48:58 -0700:
Helo,

I am using myMail.DSNOptions = 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=CreateObject("CDO.Message")
myMail.Subject="Queues|Critical"
myMail.From="Ex****@us.panasonic.com"
myMail.To="sa*******@in.ibm.com"
myMail.TextBody=msg
myMail.DSNOptions = 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:mailheader:disposition-notification-to") =
"wa*******@servermail.mydomain.com"
myMail.Fields.Update

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
1632
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...
2
2191
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...
5
5386
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?...
0
1887
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:...
2
12067
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...
1
9485
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...
0
1196
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
5312
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
6025
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
7115
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...
0
7321
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,...
0
7377
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...
1
7036
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...
1
5047
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...
0
3191
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
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 ...
1
762
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.