Send a Read Receipt through ColdFusion

…posted by davidjmedlock:

Here’s a nifty, and maybe even useful, little tidbit for using CFMAIL. Have you ever gotten an email in Outlook and seen a little popup window after you read it saying “The sender has requested a read receipt for this message. Would you like to send one now?” (Or something like that…) Well, the way that’s done is with mail headers and you can reproduce that in ColdFusion very easily:


david.medlock@example.com" from="test@example.com" server="mail.0web-hosting.com" subject="test read receipt">
test@example.com">
test@example.com">
This is a test for read receipts.

This works like a charm. It may even be possible to ask the recipient to send a read receipt to someone other than the seller. (I haven’t tried this just yet, but it should work, in theory, since it’s a header independent of the sender’s address…)

Enjoy! (And don’t send me any read receipts, I hate those things…)

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Ali Daniali

    I would love to see more information on how to add meeting requests/date reminder links that on click can add a into the users Outlook’s calendar. Any ideas?

    Thank you,
    AD

  • http://www.delyrical.com davidjmedlock

    You’d have to create a COM object to interface with Outlook. Try CFComet.com for more info on that.

  • duncancumming

    good tip. seeing as you know your mail headers, what’s your knowledge on “Errors-To” and “Reply-To”, for sending undeliverable messages to? e.g., if sending an email on behalf of clientX, where I want the undeliverables to come to a different address:




    ?

    My understanding is most mailservers ignore Errors-To, but will act on Reply-To for undeliverables. However, the end recipient will also end up sending mail to this address if they hit Reply. Ideally I’d like to just use the Errors-To field and not the Reply-To one at all, for that reason.

  • Tim Blair

    You could do the calendar/meeting request programmatically but it involves sending a multipart mail with one of the parts being correctly specified for the version of the VCALENDAR you’re using. For example, I just tried sending a meeting request to myself and here’s the mime headers from it:

    Content-class: urn:content-classes:calendarmessage
    Content-Type: text/calendar;
    name=”meeting.ics”;
    method=REQUEST
    Content-Transfer-Encoding: 8bit

    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0

    etc…

  • http://www.delyrical.com davidjmedlock

    [QUOTE=Anonymous]You could do the calendar/meeting request programmatically but it involves sending a multipart mail with one of the parts being correctly specified for the version of the VCALENDAR you’re using. For example, I just tried sending a meeting request to myself and here’s the mime headers from it:

    Content-class: urn:content-classes:calendarmessage
    Content-Type: text/calendar;
    name=”meeting.ics”;
    method=REQUEST
    Content-Transfer-Encoding: 8bit

    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0

    etc…[/QUOTE]
    Good catch. I didn’t think about meeting requests being sent via headers. I’m sure that with some ingenuity and a little elbow grease, you could create a system that integrated very thoroughly with Microsoft Office, including Outlook and even Exchange Server.

  • http://www.delyrical.com davidjmedlock

    [QUOTE=duncancumming]good tip. seeing as you know your mail headers, what’s your knowledge on “Errors-To” and “Reply-To”, for sending undeliverable messages to? e.g., if sending an email on behalf of clientX, where I want the undeliverables to come to a different address:




    ?

    My understanding is most mailservers ignore Errors-To, but will act on Reply-To for undeliverables. However, the end recipient will also end up sending mail to this address if they hit Reply. Ideally I’d like to just use the Errors-To field and not the Reply-To one at all, for that reason.[/QUOTE]
    I’m actually not too incredibly knowledgeable on mail headers. I can manage when the situation calls for it, but I don’t know them inside out. If you send a reply-to, then you run the risk of an end user/recipient sending an email to your error address.

    If you could get Errors-To to work, it may depend on your mail server configuration as you mentioned, you could essentially use a POP3 call to that mailbox to weed out incorrect email addresses. So, if someone were to register with “me [at] example [dot] com” as so many people do, you could catch that and disable their account, or flag it for delivering a message to them saying that their email address was unreachable and they need to update it to continue using the account…

    Very interesting possibilities…

  • R. Martin Ladner

    Thank you! This article met a current need perfectly. A co-worker asked me for this capability; I had it in place ten minutes after reading your article. =Marty=

  • shob

    Is there any tag which allows me to integrate outlook/lotus notes
    calender with coldfusion.
    Please let me know.
    Thanks.