Use the "Direct Reply To" option in sending an email through VBS

Hi,
is there a way i can compose a new email message in VBS and use the "Direct Reply To" so that the replies will be forwarded to another user ? i know how to do so in Outlook, but i need the vbs version? if it exists?
johnnyjonathanAsked:
Who is Participating?
 
Patrick MatthewsConnect With a Mentor Commented:
This simple VBScript illustrates how:




Dim olApp, olMsg

Set olApp = CreateObject("Outlook.Application")
Set olMsg = olApp.CreateItem(0)

With olMsg
    .To = "a@xyz.com"
    .Subject = "Subject"
    .Body = "Body"
    .ReplyRecipients.Add "b@xyz.com"
    .Send
End With

Set olMsg = Nothing
Set olApp = Nothing
0
 
Patrick MatthewsCommented:
johnnyjonathan,

Slight modification, using the Redemption DLL to sidestep one of Outlook 2003's security features implemented
starting in Outlook 2000 SP2, and persisting at least through 2002 and 2003.

To disable it, I've used three products:

1) Express ClickYes
http://www.contextmagic.com/express-clickyes/
There is a free version and a Pro version for ~$30 with more features.  I've used the pro version.
It works as advertised.  I'm not using it currently.  I'm using the MAPILab product instead.

2) MAPILab Advanced Outlook Security
http://www.mapilab.com/outlook/security/
A free COM add-in for Outlook.  I am using it now and I like it

3) Redemption
http://www.dimastr.com/redemption/
A DLL you can use in your code to disable the warnings.  Free download, but you must pay a
license to distribute.  I've used it and like it.


Regards,

Patrick
Dim olApp, olMsg, redSafeMail
 
Set olApp = CreateObject("Outlook.Application")
Set olMsg = olApp.CreateItem(0)
Set redSafeMail = CreateObject("Redemption.SafeMailItem")
redSafeMail.Item = olMsg
 
With redSafeMail
    .To = "a@xyz.com"
    .Subject = "Subject"
    .Body = "Body"
    .ReplyRecipients.Add "b@xyz.com"
    .Send
End With
 
Set redSafeMail = Nothing
Set olMsg = Nothing
Set olApp = Nothing

Open in new window

0
 
johnnyjonathanAuthor Commented:
500
0
 
johnnyjonathanAuthor Commented:
Thank you, i'm using MAPILab Advanced Outlook Security and it's working great
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.