Solved

Can you schedule mail to be sent ahead of time?

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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