Solved

send reminder e-mails

Posted on 2004-04-21
10
280 Views
Last Modified: 2013-12-25
hi

i'm preparing a project called smarthome. this project are similar to alert/reminder system. i'm using VB 6.0 and MS Access for my database and this system is a standalone.

in this system, users have to define their assets (let's say cars) date to be serviced. system will notify the user via e-mail when the time has arrived (or maybe 2 weeks before the actual date).

1)   how do i determine the frequency of reminders. lets say the service date is on 3/04/2004. so the reminders will be sent 2 weeks before, 1 week before, 3 days before, the day before and the day itself.

2)   reminders will be sent to user through e-mail defined by the user.

3)   user's computer (in which the system is operating) must stay online to send messages. messages will stay pending if there's no connection to the internet. ( am i right?)

ok that's it.
I offer you my points...ALL OF IT !!!!!
hope you can help.
thanks
0
Comment
Question by:aquanok
  • 3
  • 2
  • 2
  • +1
10 Comments
 
LVL 35

Accepted Solution

by:
[ fanpages ] earned 88 total points
ID: 10885829
Hi aquanok,

1) In VB or Access the use of DateDiff will aid your reminder schedule
    (see internal product help, or here for examples: http://www.minisolve.com/TipsDifDatesVB.htm)

2) Not sure if your second point was a question, but just a statement.

3) Yes, a connection to an external mail server needs to be maintained before any information in e-mail format can leave the machine & be sent to a named recipient.



BFN,

fp.
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10885847
Hi aquanok,

Better example of DateDiff usage:
http://www.dcomp.com/dci/Books/CCVisualBasic/CCVB5.htm

BFN,

fp.
0
 
LVL 1

Assisted Solution

by:OracleSWN
OracleSWN earned 86 total points
ID: 10901579
Hi aquanok,

       BFN's point with the datediff will work well. I have a similar application that sends out reports to users and you will need to have the application running to send out the report. Once you have established a query/view that the system checks for reminders, the below is some useful code to send out e-mails bypassing any outlook/express applications.

Set objEmail = CreateObject("CDO.Message")
With objEmail
      .FROM = Chr(34) & "Maintence Reminder" & Chr(34) & "name@domain.com"
      .To = "name@domain.com"
      .Subject = "Maintence Reminder"
      .TextBody = "This is a reminder to ......." & vbCrLf & vbCrLf & "Sincerely," & vbCrLf & "Name"  '<--- (vbCrLf) enter a carriage return character
      .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
      .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.server.com"
      .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
      .Configuration.Fields.Update
      .Send
End With
Set objEmail = Nothing
0
 

Author Comment

by:aquanok
ID: 10906294
OracleSWN
how do i send these messages when the time's arrived
without any interactions from the user.(no command button)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Assisted Solution

by:leechoonhwee
leechoonhwee earned 86 total points
ID: 10916163
In your main sub you need to have a timer function that checks itself every 24 hrs or compile your program so that you can use MS Scheduler to invoke your program every day at certain timing.

0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 10916194
You could post e-mails in your outbox (back to the sender) that are scheduled to be sent at the designated date (prior to the service) and then then next time following the "reminder" that e-mail is checked, the messages will return back into the inbox.

B)ye F)or N)ow,

f)an p)ages.
0
 

Author Comment

by:aquanok
ID: 10925613
leeechonhwee

how do i do that?
0
 
LVL 9

Expert Comment

by:leechoonhwee
ID: 10926668
The best way is to use Microsoft Scheduler to invoke your program at regular interval. Please provide your email if you need screenshots for it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

920 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

15 Experts available now in Live!

Get 1:1 Help Now