function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kim Mikhail CabelaKim Mikhail Cabela 

Email notification is not sent to Invitees -

Hello,

I created a custom vf page for event and is replicating the behavior of "Save and Send Update" for Invitees.

Here is my code below.

  if(emailonsave != null){
                    system.debug('GOFOREMAIL');
                    //code for email sending
                    EventRelation evtreltesting = new EventRelation();
                    evtreltesting.relationID = '003N000000zHUCoIAO'; // Temporary Contact
                    evtreltesting.EventId = evtInsert.id;
                    insert evtreltesting; 
                     
                    
                    //send update to invitees
                    Database.DMLOptions dmo = new Database.DMLOptions(); 
                    dmo.EmailHeader.triggerOtherEmail = true; 
                    
                    system.debug('WhatsInside' + evtreltesting);
                    for(Event eventInstance : [Select Id, IsGroupEvent from Event where Id =: evtInsert.id]){
                        if(eventInstance.IsGroupEvent){
                            system.debug('TestThis' + eventInstance );
                            Database.insert(evtreltesting,dmo);
                        }
                    
                    
                    
                }
Thanks in advance.
Amit Singh 1Amit Singh 1
Hello,
Check your email Deliverability settings.
setup -> Email Administration -> Deliverability -> Access level = ALL EMAILs
https://developer.salesforce.com/forums/?id=906F00000009E8qIAE
hope this will solve your problem :)
Thanks!
Amit Singh
Kim Mikhail CabelaKim Mikhail Cabela
Hello Amit Singh,

Thanks for your response, i was able to fix this earlier. Right now my problem is sending an email update using the same EmailHeader class.

Regards,
Kim