Solved

Sending an automated reply using Outlook Redemption...

Posted on 2003-11-21
11
576 Views
Last Modified: 2007-12-19
Is there a way to reply to an e-mail using Outlook Redemption? I'm setting up a Access application to save the emial that comes through a certain account (Sorted by an Outlook rule) and I'd like it to send an reply automatically.

Any help would be appreciated
0
Comment
Question by:will_scarlet7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 7

Expert Comment

by:wsteegmans
ID: 9798834
Something like this?

Sub SendAutoReply
    Dim appOutlook As New Outlook.Application
    Dim msgReturn As Object
   
    Set msgReturn = appOutlook.CreateItem(olMailItem)
    msgReturn.MessageClass = "REPORT.IPM.NOTE.IPNRN"    ' it's like a return receipt!!
    msgReturn.To = "mail@mycompay.com"
    msgReturn.Body = "Received your e-mail"
    msgReturn.Send
End Sub
0
 
LVL 7

Expert Comment

by:wsteegmans
ID: 9798861
Don't forget to reference your Microsoft Outlook x.0 library!
Menu: Tools -> References
0
 
LVL 15

Author Comment

by:will_scarlet7
ID: 9798994
Thanks wsteegmans

However since I'm not running an Exchange Server, I'm using redemption to work arount the security warnings in Outlook.

(Running Outlook XP)
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 7

Accepted Solution

by:
wsteegmans earned 250 total points
ID: 9799074
0
 
LVL 3

Expert Comment

by:fcfang
ID: 9799696
If you don't want to rely on Outlook (painful at best), try this dll

http://www.freevbcode.com/ShowCode.Asp?ID=109

I've used it in my applications successfully (and no, I'm not a telemarketer/spammer :-P )
 
0
 
LVL 7

Expert Comment

by:wsteegmans
ID: 9799774
fcfang,
It is a nice solution, but doesn't work very well in Access (missing some OCX-files).

will_scarlet7,
A really simple E-mail thing in Access: DoCmd.SendObject, like this.
DoCmd.SendObject , , acFormatHTML, "sendto@company.com", , , "MySubject", "My Body Message text ...", True

It uses your default E-Mail Client. Don't know how it reacts with Outlook XP.
0
 
LVL 18

Expert Comment

by:lludden
ID: 9800107
I have had great luck using this software.

http://www.emailarchitect.net/webapp/smtpcom/developer.asp
0
 
LVL 3

Expert Comment

by:fcfang
ID: 9801978
wsteegmans,

I actually do use this in Access by creating a reference directly to the dll.
0
 
LVL 7

Expert Comment

by:wsteegmans
ID: 9802205
fcfang,

But using it on a PC without VB6, you're missing the OCX: MSWINSCK.OCX.

OK, you can download it here ...
http://lettermanstationery.tripod.com/vbruntimes.htm
0
 
LVL 15

Author Comment

by:will_scarlet7
ID: 9802349
Thanks guys for your input. I'm trying to stick with using Outlook though rather than using an 3rd party SMTP.
0
 
LVL 15

Author Comment

by:will_scarlet7
ID: 9802441
I figured it out. I guess it shows how green I am at programming by how simple the solution ended up being (reply line is anoteated below with "•¤•"
I'll include the code below in case anyone else is interested in using it:
*****************************************
Sub RedemptionMail()

Dim oOutlook As Outlook.Application
Dim oFldr As Outlook.MAPIFolder
Dim oMsg, oReply As Redemption.SafeMailItem
Dim mSender As Redemption.AddressEntry
Dim mSendQue As Redemption.MAPIUtils
Dim oMessage As Object
Dim oNs As Outlook.NameSpace
Dim mSubject, mFrom, mBody As String

Set oOutlook = New Outlook.Application
Set oNs = oOutlook.GetNamespace("MAPI")
Set oFldr = oNs.PickFolder
Set oMsg = CreateObject("Redemption.SafeMailItem")
Set oReply = CreateObject("Redemption.SafeMailItem")
Set mSendQue = CreateObject("Redemption.MAPIUtils")

oMsg.AuthKey = "*******"
oReply.AuthKey = "*******"
mSendQue.AuthKey = "*******"

For Each oMessage In oFldr.Items
    oMsg.Item = oMessage
    oReply.Item = oMessage.Reply ' •¤• Create reply to original message •¤•
    oReply.Body = "Testing Auto Reply"
    oReply.Send
    mSubject = oMsg 'Get e-mail subject
    mFrom = oMsg.SenderName 'Get e-mail SendersName
    Set mSender = oMsg.Sender
    mFromAdd = mSender.Address
    mBody = oMsg.Body 'Get e-mail message body
Next oMessage

mSendQue.DeliverNow

Set oOutlook = Nothing
Set oNs = Nothing
Set oFldr = Nothing
Set oMsg = Nothing
Set oReply = Nothing
Set mSender = Nothing
Set mSendQue = Nothing

End Sub
*****************************************

The cool thing about this is that I did not get any of the standard security warnings, and since I am using Outlook I have a copy of the replies in the "Sent Items" folder.

Note: Since it seems that installing redemption could open a exploitable hole in the mail system of my PC, I set it up to require a AuthKey.

I'm not sure how to close this as I ended up working it out myself.
wsteegmans I guess I could give you the points since you provided me with the most help on Redemption.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question