AnsweredAssumed Answered

How to send emails when a record in a custom module is created in CE 6.5.18?

Question asked by LMSzor LMSzor on Nov 24, 2014
Hi. In company I'm working in, we need to send e-mail after adding new record in custom module (I already created the module by using Module Builder), that is related to Opportunities module. The e-mails need to be sended from a template, but with a custom title (there is a formula for it) and to someone else than one of Contacts related to Account.

We're using SugerCRM 6.5.18 CE, and I was thinking about using Logic Hooks method after_save, but... E-mail message will be sended every time the record will be saved to database (so, after editing an record in custom module the e-mail will be sended again, and we don't want that), or am I wrong? I wish it to be done as best as it can, and by that I mean the changes to be upgrade-safe.

The reason for doing this is to start integrating the companys inside systems into SugarCRM, so our Sales department will be released of some ammount of work.

I would love to see some snippest or pseudo-code if possible.

Sincerely, SugarNewbie. :)

Outcomes