How to forward a message and delay sending for up to 30 days

Status
Not open for further replies.

markymark

Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
Hi

I'm using Outlook 2010 and need to do the following.

I receive email from someone with certain words in subject and I need to forward it to someone else and defer sending it it by 30/45 days.

Is this possible? I know there is options for defering delivery up to 120 minutes or delay delivery when doing it manually but need a rule to this automatically.

Thanks
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Start with this script:

Run a Script Rule: Change Subject then Forward Message

and use something like this to the deferral - where 45 is the # of days you want to defer it.

SendAt = DateSerial(Year(Now), Month(Now), Day(Now)) + 45
myForward.DeferredDeliveryTime = SendAt
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
decimals. now + .25 = 6 hours from now.
For 20 minutes, use
sendat = Now() + 0.01388

This calculates the date and adds 45 days - the message sends at midnight.
DateSerial(Year(Now), Month(Now), Day(Now)) + 45
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
BTW, if you want to delay mail up to 120 minutes, you can use a rule to defer delivery. In rules wizard choose 'apply on messages i send' and use the defer delivery action. To hold more than 2 hours you need to set the defer delivery field either manually or using a macro.
 

Barry Wardill

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server 2010
BTW, if you want to delay mail up to 120 minutes, you can use a rule to defer delivery. In rules wizard choose 'apply on messages i send' and use the defer delivery action. To hold more than 2 hours you need to set the defer delivery field either manually or using a macro.

Hi
I knew about the outlook rule to defer but it doesn't do exactly what I want, thanks for your advice and i'll give the 'minutes' code a try

cheers

Barry
 

Barry Wardill

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server 2010
Hi Diane

I have tried this for forwarding with a delay of 20 minutes, the subject changes but I don't receive the forwarded mail, have I missed something or got code in the wrong order? as you can probably tell I'm new to this -

Sub ChangeSubjectForward(Item As Outlook.MailItem)
Item.Subject = "Forwared to FCI"
Item.Save

Set myForward = Item.Forward
myForward.Recipients.Add barry.wardill@*********.co.uk

myForward.DeferredDeliveryTime = SendAt

SendAt = Now() + 0.01388

End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Is it in the outbox? (If it looks like a draft, an addin is marking the mail read when you open the folder. )
Yeah, the time calc is in the wrong order and you need either .display or .send. I like to use .display during testing so i can see when the messages look like without sending them. Change to .send when you are satisfied it works good.

Code:
Sub ChangeSubjectForward(Item As Outlook.MailItem)
Item.Subject = "Forwared to FCI"
Item.Save

SendAt = Now() + 0.01388
Set myForward = Item.Forward
myForward.Recipients.Add barry.wardill@*********.co.uk
myForward.DeferredDeliveryTime = SendAt
myforward.display ' use display to test
 
End Sub
 

Barry Wardill

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server 2010
Is it in the outbox? (If it looks like a draft, an addin is marking the mail read when you open the folder. )
Yeah, the time calc is in the wrong order and you need either .display or .send. I like to use .display during testing so i can see when the messages look like without sending them. Change to .send when you are satisfied it works good.

Code:
Sub ChangeSubjectForward(Item As Outlook.MailItem)
Item.Subject = "Forwared to FCI"
Item.Save

SendAt = Now() + 0.01388
Set myForward = Item.Forward
myForward.Recipients.Add barry.wardill@*********.co.uk
myForward.DeferredDeliveryTime = SendAt
myforward.display ' use display to test

End Sub

Hi Diane

that works a treat, thank you...............one thing I had missed off though was the quotes around my recipient

Thanks again for your help

Cheers

Barry
 
Status
Not open for further replies.
Top