Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2003
    Posts
    8

    Question Unanswered: how to send Email Automatically on specific Date using trigger or any timer fuction??

    Hi All,

    I am developing web based application using ASP and need to design and develope feature (Any Trigger) by which Automatic emails should send to specific users from database on specific date and time, user selection will be based on some criteria defined by site administrator.
    But Emails should send automatically , it should not initiated by any one.

    Is there any Component / Trigger or NT service which perform this task?

    Please Any body let me know how to ?

    Regards
    Imran
    Last edited by imranmalik; 08-28-03 at 07:37.

  2. #2
    Join Date
    Jul 2003
    Location
    Ohio/Chicago
    Posts
    75
    i use the stored procedure XP_sendmail, but beware of utf-8 requirements, i have problems getting that to work

  3. #3
    Join Date
    Apr 2003
    Posts
    8

    Unhappy ??????????

    Can you please discuss it further ??... what is this Stored Procedure XP_sendmail and how can I get it ?? I never handled utf-8 requirements

    please let me know the details .. I will really appreciate your help.

    Thanks and Regards
    Imran

  4. #4
    Join Date
    Jan 2002
    Location
    Libya
    Posts
    50
    Hi,
    I usually build a DTS package (Data Transformation Service) and use an ActiveX object. Write some code using VBScript or JavaScript.

    To send an email you may use the CDONTS object. it is very simple to use, just create the object, set its properties (From, To, Subject, Message) and send.

    Hope this helps!
    Khalid Yousef

  5. #5
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Ack.. CDONTS and xp_sendmail require you to have a MAPI client (aka, Outlook) installed and configured with a mailbox, on your web server, for it to work. In an enterprise environment, that would never happen.

    Another solution would be to use a component like ASPMail (www.serverobjects.com) to send email. You can send an email from the ASP, or you could code it into an ActiveX script. I use this quite regularly.

  6. #6
    Join Date
    Jul 2003
    Location
    Ohio/Chicago
    Posts
    75
    I usually only us XP_sendmail if i want to keep it SQL side, I don't know why I thought you wanted it that way, but in anycase, there's really many ways to do it. If this is a corporate environment there's probably a high chance this is available, i'm not sure what seppuku meant. I don't use CDONTS but can't that actually be used SMTP? I'm not sure, ASPmail works too, it really depends on your environment and what you need/have available, and what you need the email to do, CDONTS is terrible for mass mailings.

  7. #7
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Originally posted by unatratnag
    I usually only us XP_sendmail if i want to keep it SQL side, I don't know why I thought you wanted it that way, but in anycase, there's really many ways to do it. If this is a corporate environment there's probably a high chance this is available, i'm not sure what seppuku meant. I don't use CDONTS but can't that actually be used SMTP? I'm not sure, ASPmail works too, it really depends on your environment and what you need/have available, and what you need the email to do, CDONTS is terrible for mass mailings.
    CDONTS uses MAPI calls to send the email. To execute a MAPI call to send email you have to supply a valid mailbox on the server to the CDONTS object. Unfortunately it requires Outlook to be installed to create a mailbox. xp_sendmail uses CDONTS as well, and therefore, makes MAPI calls through the mailbox on the server. If you don't have Outlook installed on the server, your emails will fail (We had this happen with a vendor until we discovered what was wrong and had them change their mailer object).

  8. #8
    Join Date
    Jul 2003
    Location
    Ohio/Chicago
    Posts
    75
    Well you just need the CDO components to be exact, but that's cool, i thought cdonts was more flexible but I guess not...

    I didn't know XP_sendmail used cdonts..... It's certainly possible since anyserver i've used it on probably uses cdonts too, but i know you can't specify a return address, that it automatically comes from the mail server by default.

  9. #9
    Join Date
    Apr 2003
    Posts
    8

    Smile Thanks

    Hi unatratnag , Seppuku and Khalid
    Thank you all for help and references .... I have started working with xp_sendmail (T-SQL) , will let you know and contact you if need any further assistance or help.... Thanks again.

    Best Regards
    Imran

  10. #10
    Join Date
    Jul 2003
    Location
    Ohio/Chicago
    Posts
    75
    CDONTS uses MAPI calls to send the email. To execute a MAPI call to send email you have to supply a valid mailbox on the server to the CDONTS object. Unfortunately it requires Outlook to be installed to create a mailbox. xp_sendmail uses CDONTS as well, and therefore, makes MAPI calls through the mailbox on the server.
    I just looked into it
    CDONTS: to use this component to you need the SMTP Server that ships with IIS 4 or 5 installed on the web server. The SMTP server is usually installed by default with the standard IIS installation. It does not make a MAPI call, and does not verify the user against the mail server. Any return address is valid.

    XP_sendmail: does not use CDONTS. Does use MAPI calls and do validation that way.

  11. #11
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    I stand corrected...

  12. #12
    Join Date
    Nov 2003
    Location
    ahmedabad, india.
    Posts
    1

    Re: how to send Email Automatically on specific Date using trigger or any timer fuction??

    Originally posted by imranmalik
    Hi All,

    I am developing web based application using ASP and need to design and develope feature (Any Trigger) by which Automatic emails should send to specific users from database on specific date and time, user selection will be based on some criteria defined by site administrator.
    But Emails should send automatically , it should not initiated by any one.

    Is there any Component / Trigger or NT service which perform this task?

    Please Any body let me know how to ?

    Regards
    Imran

Posting Permissions

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