Results 1 to 2 of 2

Thread: Automatically sending emails x days before a custom date....

  1. #1
    aaelghat is offline Member
    Join Date
    Aug 2007
    Posts
    8

    Default Automatically sending emails x days before a custom date....

    Hi, I run a business where people sign-up for subscriptions. I have a date field in Contacts where I record the subscription stop date, and what I'd like to do is every day have a job that runs that would send out an email 10 days before the subscription stop date (e.g. if stop date is Feb 5th, have the email go out around Jan 26th).

    How would I go about doing this? Thanks in advance.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Automatically sending emails x days before a custom date....

    Hi aaelghat

    You need to do the following:

    1. Create a script into Contacts module modules/Contacts/AlertSubscirption.php containing the code to send an email warning the upcoming subscription end date;
    2. Edit the file modules/Schedulers/_AddJobsHere.php adding a new entry into array $job_strings and a new function whose name is the entry itself. Take a look at the function "runMassEmailCampaign", basically you need to include the script containing the code;
    3. Go to Admin -> Schedulers and add a new scheduler selecting your new task;
    4. Make sure your cron contains an entry for triggering the SugarCRM installation.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 2008-12-05, 08:26 AM
  2. Replies: 6
    Last Post: 2008-10-09, 09:13 PM
  3. Replies: 0
    Last Post: 2006-10-11, 09:51 PM
  4. Replies: 0
    Last Post: 2006-07-12, 07:05 AM
  5. Anyway to automatically bcc on all emails?
    By swduncan in forum Help
    Replies: 0
    Last Post: 2006-04-04, 05:51 PM

Bookmarks

Posting Permissions

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