php email notification

4 replies
hello,

i am developing a php program for a hostel. i want get a email notification on a special date if anyone don't pay rent. how can i do this on php .. any idea ?

----------------------------example -----------------------------

hostal have 25 rooms.. one person joind hostal on 15th date his room number is 15, so every month 15 th date i want to get a email notification if he not paid rent ...


any idea ?
#email #notification #php
  • Profile picture of the author ramsarvan
    Hi,

    you can use cronjob for this purpose.

    create a php file, in it code in such a way that,
    compare every day with the day mail wants to be send.

    And set the file to run once every day.
    {{ DiscussionBoard.errors[4619223].message }}
    • Profile picture of the author adsense786
      Originally Posted by ramsarvan View Post

      Hi,

      you can use cronjob for this purpose.

      create a php file, in it code in such a way that,
      compare every day with the day mail wants to be send.

      And set the file to run once every day.

      thanks ... i don't know about cronjob ( i am a newbie to php ) . i will googling about this .. if i don't get any thing ..i will disturb you again ..
      {{ DiscussionBoard.errors[4619366].message }}
  • Profile picture of the author jaybaker
    In most cases cron jobs can be set up easily through your host and cpanel.

    The set up is something like seconds, minutes, hours, days, etc and the command line for running your script

    So for instance *,*,*,1 would mean run every day the command you set.

    If this does not work or you dont want to run it via cron job simply navigate to the script url and have it print out their info including room and date they paid. Then simply set up date using strtotime to convert 31 days to the proper date and if todays date is equal to the day after rents due then set off the mail function.

    Hope this helps
    Signature

    Do you want to make successes or excuses? Success? Alright then... See what's in store for you....
    - The AC Assassin

    {{ DiscussionBoard.errors[4628389].message }}

Trending Topics