will_scarlet7
asked on
Sending an automated reply using Outlook Redemption...
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
Any help would be appreciated
Don't forget to reference your Microsoft Outlook x.0 library!
Menu: Tools -> References
Menu: Tools -> References
ASKER
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)
However since I'm not running an Exchange Server, I'm using redemption to work arount the security warnings in Outlook.
(Running Outlook XP)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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 )
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 )
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.
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.
I have had great luck using this software.
http://www.emailarchitect.net/webapp/smtpcom/developer.asp
http://www.emailarchitect.net/webapp/smtpcom/developer.asp
wsteegmans,
I actually do use this in Access by creating a reference directly to the dll.
I actually do use this in Access by creating a reference directly to the dll.
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
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
ASKER
Thanks guys for your input. I'm trying to stick with using Outlook though rather than using an 3rd party SMTP.
ASKER
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("MAP I")
Set oFldr = oNs.PickFolder
Set oMsg = CreateObject("Redemption.S afeMailIte m")
Set oReply = CreateObject("Redemption.S afeMailIte m")
Set mSendQue = CreateObject("Redemption.M APIUtils")
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.
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("MAP
Set oFldr = oNs.PickFolder
Set oMsg = CreateObject("Redemption.S
Set oReply = CreateObject("Redemption.S
Set mSendQue = CreateObject("Redemption.M
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.
Sub SendAutoReply
Dim appOutlook As New Outlook.Application
Dim msgReturn As Object
Set msgReturn = appOutlook.CreateItem(olMa
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