Results 1 to 7 of 7

Thread: Lead Insertion

  1. #1
    Varun50 is offline Senior Member
    Join Date
    Jul 2009
    Posts
    23

    Default Lead Insertion

    hi i am also interested in implementing functionality for sending mail on lead insertion. Please let me know where i can find lead insertion logic so that i can then club mail sending functionality to a lead owner.

    Any help will be highly appreciable.

  2. #2
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Re: Lead Insertion

    I also have to send an email, when creating a Lead, but i need to send the email to the address, specified in the Lead creation form.

  3. #3
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Lead Insertion

    Process Manager from the SugarForge can trigger actions such as emails on the creation of a new record.

  4. #4
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: Lead Insertion

    simply do this in a Hook

    ---
    require_once('include/SugarPHPMailer');

    $myEmail = new SugarPHPMailer8);
    $myEmail->AddAddress("whoever@whereever.com","the guy to get the email");
    $myEmail = Email::setailer($myEmail);
    $myEmail->Subject = "hey there is a new lead!";
    $myEmail->Body = "whatever more information you want to share and have at hand";
    $myEmail->FromName="SugarCRM LeadProcessor";
    $myEmail->From = "leads@mysugarcrm.com";
    $myEmail->Priority = 1; // this is mega urgent!!!
    $myEmail->Send();
    ---

    and you have sent an email ...

    enjoy ... christian.

    Quote Originally Posted by dskanth View Post
    I also have to send an email, when creating a Lead, but i need to send the email to the address, specified in the Lead creation form.

  5. #5
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: Lead Insertion

    btw:

    (1) no guarantee that this proper - just did type this off the top of my head .. some things might have slightly different names
    (2) it might be a good idea to do this in the before save hook and update a flag that the email has been sent .. otherwise everytime you save the email twill be sent
    (3) to make it really nice parse a email template to the bean ... ;-)


    christian.

    Quote Originally Posted by christianknoll View Post
    simply do this in a Hook

    ---
    require_once('include/SugarPHPMailer');

    $myEmail = new SugarPHPMailer8);
    $myEmail->AddAddress("whoever@whereever.com","the guy to get the email");
    $myEmail = Email::setailer($myEmail);
    $myEmail->Subject = "hey there is a new lead!";
    $myEmail->Body = "whatever more information you want to share and have at hand";
    $myEmail->FromName="SugarCRM LeadProcessor";
    $myEmail->From = "leads@mysugarcrm.com";
    $myEmail->Priority = 1; // this is mega urgent!!!
    $myEmail->Send();
    ---

    and you have sent an email ...

    enjoy ... christian.

  6. #6
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Re: Lead Insertion

    Hi, i have tried the code given by you above, but it did not send any email after creating a Lead. I found few mistakes in the code, like: it should be: new SugarPHPMailer(); and the function Email::setailer($myEmail); is undefined.

  7. #7
    zlucy is offline Junior Member
    Join Date
    Dec 2009
    Posts
    4

    Default Re: Lead Insertion

    Is setMailer...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Insertion enregistrementss
    By ayac in forum Français
    Replies: 0
    Last Post: 2009-06-29, 09:56 AM
  2. Problem with Saving Lead info with Lead Table vs Quick Lead Create Table
    By crmzepher in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2009-02-20, 05:30 AM
  3. Inbound mail - case ticket number insertion on new mail
    By lelandv in forum Feature Requests
    Replies: 0
    Last Post: 2008-11-12, 10:46 AM
  4. Replies: 0
    Last Post: 2005-05-04, 04:39 PM
  5. Automatic form insertion
    By SuperFlies in forum Feature Requests
    Replies: 3
    Last Post: 2005-04-07, 07:49 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
  •