Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: automatic email

  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    89
    Thanks
    2
    Thanked 0 Times in 0 Posts

    automatic email

    Hi Folks,

    I have been asked to try and write a program that basically pulls some info from a sql database and automatically emails it to an email address on a certain day of the week

    So if anyone can offer advice or if they know of any script or tutorials online, I would be very grateful if you could let me know

    Thanks

    J

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    You need a program that can be scheduled, not one that runs from the web.
    ASP is not for this.

    Use VB6, VB.NET, Java, or another independent language that can compile to an exe that can be scheduled via Windows scheduler or *nix crontab (depending on what computer it runs on).

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Automating Tasks with WSH by Mark Lidstone - 10/13/1999
    http://www.4guysfromrolla.com/webtech/101399-1.shtml

    How do I schedule ASP files?
    http://www.aspfaq.com/show.asp?id=2143

    And here's a nice CDO link even if you don't use the attachment part:
    Email (with Attachment)
    http://www.asp101.com/samples/email_attach.asp
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    *snaps*
    Oh, I forgot Windows can run vbs files like exe.

    Still kinda misleading of them to say you can schedule asp files, though, when you have to change it all to wsh code.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #5
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Still kinda misleading of them to say you can schedule asp files, though, when you have to change it all to wsh code.
    Good point.

    Or code could be written so that the first time a user comes to the site on the designated day an e-mail is sent and also a LatestEmailSentDate field is updated so that no more e-mails are sent on that day.
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •