![](../images/header/spacer.gif) |
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
![Old](../images/statusicon/post_old.gif)
November 22nd, 2004, 04:41 AM
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Receiving mail
Hi,
I amgenerating Purchase Order generated from database. Then i send it to the supplier. I am using CDONTS to send mail.
I am not sure that it was sent or not.
So i need confirmation when they read it or received. How can i send a mail with acknowledgement?
Thanx in advance.
------------
Rajani
|
![Old](../images/statusicon/post_old.gif)
November 22nd, 2004, 05:16 AM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You can include a small image in your mail. Set the source of it as below.
<img src="readrecord.asp?id=<purchase_order_number>" border="0" alt="">
where purchase_order_number is a number which will uniquely determine this purchase order.
The code in the readrecord.asp will be as below.
if(Request.QueryString("id")<>"") then
' record in db that the mail corresponding to the purchase order id=Request.QueryString("id") is read.
response.buffer = true
response.clear
response.expires = 0
response.contenttype = "image/gif"
response.binarywrite <the file system object pointing to the image file (a blank image)>
end if
You need to define a file system object and open the image file using it. Then use that object in the response.binarywrite.
In this way, you can record that whether the mail corresponding to a purchase order is read or not.
Note that this may not work with all IMAP mails. For e.g. rediffmail.com prevents such images from mails.
This will work with all POP mail clients like eudora and outlook.
|
![Old](../images/statusicon/post_old.gif)
November 22nd, 2004, 05:28 AM
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Madhu,
I am generating the PO and storing the HTML in a variable
strHTML="<html>.....</html>"
When the user clicks the button "Send this PO", its submitting to new page sendpo.asp It includes
set sndmail=server.createObject("CDONTS.NewMail")
sndmail.to=request("txtTO")
sndmail.From=session("mailid")
sndmail.body=request("txtStrHTML")
sndmail.subject=request("txtPONumber")
sndmail.importance=2
sndmail.send
So, this will be sent to supplier. They will read the mail in their inbox(outlook/any email client). Once they read this mail i want to receive a mail from that id to the mailids specified in From attribute
How can i do this. If i send mail using outlook i can get receipts. But i want to send PO thru ASP.
----------
Rajani
|
![Old](../images/statusicon/post_old.gif)
November 22nd, 2004, 07:16 AM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just as I told, you can attach the following HTML to request("txtStrHTML")
<img src="readrecord.asp?id=<purchase_order_number>" border="0" alt="">
and then program readrecord.asp as above.
-----------------------------------------------------------------------
Another method is to use ASPMail component. This object has a property by name ConfirmRead. When this is set, you will get a mail back to the from address if permitted by the receiver.
This is not a perfect method as the receiver may specify that no notifications should be sent to the sender.
|
![Old](../images/statusicon/post_old.gif)
November 22nd, 2004, 07:19 AM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
For ASPMail, there is also another property - ReturnReceipt. When this is set AND the recipients SMTP server supports this feature (and it is enabled) the recipients SMTP server will send a notice back to the FromAddress confirming that this email has been delivered.
|
![Old](../images/statusicon/post_old.gif)
November 22nd, 2004, 02:47 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I am not sure if this method (using <img> tag with readrecord.asp?) would solve the purpose. When the PO mail is sent outside the network and as Rajani wants read confirmation from the mail Id that is not internally used, the recipient's computer should be able to access "readrecord.asp" from remote network, which means that should be hosted public.
May be using a thirdparty mail object like ASPMail would help or look for other such objects.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
![Old](../images/statusicon/post_old.gif)
November 22nd, 2004, 08:58 PM
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hello,
You r right. The site is not hosted for public. This is intranet application. When the PO is sent, no chance that the receipient will access our site. So there is no question of readreceipt.asp
They will receive the mail in their outlook or any mail client. They dont know whether it is sent thru any webpage. They will get this mail as just a mail. Once they read, we need a read receipt. My outlook is configured for need read receipt for every outgoing mail from outlook. Then we receive read receipt.
Or, if i send mail using OUTLOOK.Application, from asp page, will it be send thru outlook? i mean it uses outlook settings?
Then it solves my problem.
----------
Rajani
|
![Old](../images/statusicon/post_old.gif)
November 23rd, 2004, 02:30 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
quote:Or, if i send mail using OUTLOOK.Application, from asp page, will it be send thru outlook? i mean it uses outlook settings?
|
Only if the recipient reads the mail using OUTLOOK. If the recipient uses any other mail client to read the mail, that doesn't support sending read receipt, there is no possibility of sending that back to you. It purely depends on the recipient's mail client.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
![Old](../images/statusicon/post_old.gif)
November 23rd, 2004, 08:50 PM
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi all,
Thanx for u r affort. I solved this using CDO
Yes, my customers use outlook only. So, no problem with read receipt.
Thanq
|
![Old](../images/statusicon/post_old.gif)
November 24th, 2004, 12:43 AM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hello Rajani,
May I know how did you solve it through CDO ? Because, I didn't find any property / method for CDO with which I can request a read receipt.
Thanks
Madhu
|
|
![](../images/header/spacer.gif) |