by Izertis

Create documents in docx, xlsx (MS Office Word and Excel), odt, ods (LibreOffice and OpenOffice) and pdf format without MS Office or others plugins installed from any module and subpanel using templates.

Includes a 30 day guarantee
Try it Now

By clicking you consent to share your profile with the developer

#3052 - How to Mail Merge and Attach to Email through Coding

Closed General Question created by josh2 7 years ago

I have a custom module called "Transactions". These are related to Opportunities (Sales in our CRM).

When Payroll goes to pay our Agents on an Opportunity we have a custom feature which automatically creates Transactions for them.

What I want to do for them is help automate the Statement process.

Currently they have to manually create Statements in Excel from the Transactions and individually send them out the Agents.

I want to create a Mail Merge from the Transactions module and then when they click 'Pay' from the Opportunities module, have it mail merge and attach to an email and send that out automatically for each person.

These 2 websites detail how to send out an email from Sugar through the code: https://developer.sugarcrm.com/2011/08/15/howto-send-and-archive-an-email-in-sugar-via-php/comment-page-1/#comment-50205 https://johndopenotes.wordpress.com/2013/03/26/sugarcrm-send-email-with-attachment-using-sugarphpmailer-class/

I'm just trying to figure out how to create the attachment from Mail Merge Reports and then attach it to an email and send it out, but ensure the email gets put in the History Subpanel.

Any help would be appreciated. Thanks!

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
  • "The single biggest downfall of the community edition of SugarCRM or SuiteCRM is the lack of creating a report form a custom module for a single event...." - ian

    Read More Reviews