Solved

Can you schedule mail to be sent ahead of time?

Posted on 2000-04-28
3
172 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
  • 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now