[kronolith] Calendar event alarm reminders via e-mail

Aria Bamdad aria at bsc.gwu.edu
Mon Feb 24 15:44:30 UTC 2020


> >> <snip>
> >> And, then sets $to-email to $alarm['params']['mail']['email'] if it's
> >> not empty or else, sets it to $from-email.
> >>
> >> Then in the next section below, use from-email and to-email instead
> of
> >> $email for both?
> >>
> >>
> >>         try {
> >>             $mail = new Horde_Mime_Mail(array(
> >>                 'Subject' => $alarm['title'],
> >>                 'To' => $email,
> >>                 'From' => $email,
> >>                 'Auto-Submitted' => 'auto-generated',
> >>                 'X-Horde-Alarm' => $alarm['title']));
> >>             if (isset($alarm['params']['mail']['mimepart'])) {
> >>                 $mail-
> >> >setBasePart($alarm['params']['mail']['mimepart']);
> >>             } elseif (empty($alarm['params']['mail']['body'])) {
> >>                 $mail->setBody($alarm['text']);
> >>             } else {
> >>                 $mail->setBody($alarm['params']['mail']['body']);
> >>             }
> >>
> >> This may be a naive solution as I am not a PHP programmer!
> >>
> 
> Sorry, I thought I had already answered this, but I must have
> forgotten...
> 
> What you describe should work. Just be aware that this handler is used
> by more than Kronolith so this change will affect all email sent via
> Horde_Alarm.
> 
> >
> > Can anyone provide some feedback on whether the above is possible.
> > In fact, I was thinking that the calendar event reminders don't even
> > have to be sent from an address that belongs to the user's identity
> > at all.  All calendar event e-mail notifications from the system
> > could come from a generic (non-existent) email address like
> > do_not_reply at example.com .   So until there is a horde based
> > solution for this, can I just hardcode the generic address in the
> > From field abov: like 'From' => 'do_not_reply at example.com',
> >
> > Thanks.


Thank you Michael.  I realize that the Horde_Alarm is used by other modules, but in my environment, I have already manually disabled other notifications (calendar invites/cancellation) because these are handled by the client (outlook) used.  I had put in an enhancement request to allow the user to disable the notification system via a configuration option https://bugs.horde.org/ticket/14772 .  

I also created an enhancement request to allow for configuration of the event alarms as you suggested earlier:  https://bugs.horde.org/ticket/14983  I think this is even more important because of the fact that other systems tag these messages as spam or suspicious. 

Thanks for your help. 

Aria





More information about the kronolith mailing list