Solved

Can you schedule mail to be sent ahead of time?

Posted on 2000-04-28
3
189 Views
Last Modified: 2013-12-18
I need to now if and how to set up certain emails to go when I am not here? Is there a way to schedule this??
0
Comment
Question by:skatpmq
[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
  • 2
3 Comments
 
LVL 5

Expert Comment

by:snocross
ID: 2760733
You can create a separate db and copy the mail form from your mail template.  Create an agent (ie: called Deliver Mail that runs hourly or daily or whenever you want)

Here's the code to mail the documents in your new db:

Dim Session As New Notessession
     Dim SourceDb As NotesDatabase
     Dim Db As NotesDatabase
     Dim SourceView As Notesview
     Dim DestView As Notesview
     Dim SourceDoc As Notesdocument
     Dim DestDoc As Notesdocument
     Dim p As Variant
     Dim x As Variant
     Dim y As Variant
     Dim z As Variant
     Dim Tot As Integer
     Dim SourceDealNum As String
     Dim SourceLineNum As String
     Dim TotalPaid As String
     Dim Payment As Integer
     Dim NewDeal As String
     Set db = session.Currentdatabase
     
     Print("Started process")
     Set SourceDb = New NotesDatabase("server", "web\router.nsf")
     Set SourceView = SourceDb.GetView("Undelivered")
     SourceView.AutoUpdate = False
     Set SourceDoc = SourceView.GetFirstDocument
     
     While Not SourceDoc Is Nothing    
          Dim memo1 As New Notesdocument(Db)
          memo1.form = "Memo"
          memo1.Subject = SourceDoc.Subject
          memo1.SendTo = SourceDoc.SendTo
          memo1.CopyTo = SourceDoc.CopyTo
          memo1.BlindCopyTo = SourceDoc.BlindCopyTo
          Dim rtitemA As NotesRichTextItem
          Dim rtitemB As NotesRichTextItem
          Set rtitemA = SourceDoc.GetFirstItem( "Body" )
          Set rtitemB = memo1.CreateRichTextItem( "Body" )          
          Call rtitemB.AppendRTItem( rtitemA )        
          Call memo1.Send(False)
          Print("Mail Sent")        
          SourceDoc.Delivered = "Yes"
          Call SourceDoc.Save(True,True)
          Set SourceDoc = SourceView.GetNextDocument(SourceDoc)
     Wend
     
     Print("Completed successfully")

You could also do something similar in your mail file except you would have to turn the template off and you may not want to do that.  
0
 
LVL 5

Expert Comment

by:snocross
ID: 2760739
Important to remember:  if you schedule the agent to run on a server it will say the message is from the server.  If you want the message to appear as though it came from you then you will need to schedule the agent to run locally on your pc.
0
 
LVL 1

Accepted Solution

by:
DButler earned 50 total points
ID: 2761246
Here's a bit of a kludge, but it's fast and easy:

-- Create a folder called "System Folder" (or something similar -- maybe call it zzzSystem to sort it to the bottom of the list).

-- put ONE (and only ever ONE) document in the folder.  Give the document a subject like "SYSTEM DOCUMENT - DO NOT DELETE".

-- Create a scheduled agent that:
----- acts on "All documents in database"
----- IMPORTANT:  has a search criteria for the agent of "In folder" for your newly created system folder.
----- has a simple action (or formula if you wish) of "Send mail message." with the blanks filled in appropriately.

Because you use the a simple action or formula language, the message will appear to come from you and not the server.  If you use LotusScript, then head snocross' warning (but there are script ways around that, too).
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

627 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