Redirect or send mail in a script that runs in a rule on incoming mails in outlook 2010
- by Guido Mertens
I have the following problem:
- I have a mails that are arriving in my mailbox
- these mails contain a specific string in the body
- what I want to do is:
-- removing this string from the body
-- then send this body to another mail adres (send, not forward)
What have I already done:
A. created a rule that activates the script in incoming messages that contain a certain string in the description
This is the rule description:
Apply to message
with "Maileater" in the subject
and on this computer only
run "Project1.ChangeString"
B. created the script with the following instructions:
Public Sub ChangeString(MyMail As MailItem)
Dim body As String
body = MyMail.body
body = Replace (body, "=====================================================", " ")
MyMail.body = body
MyMail.Save
End Sub
C. now I want to add in the script the instruction to send the body (or MyMail.body) to a specific mail adres (e.g. [email protected] with description "Support asked") after the replace of the string.
is this possible?
Can someone help me with this, I would be very greatfull because this will eliminate me from a lot of manual work.
remark: this is just an exemple of a mail, the real thing will contain other replacements and mails to send