Use Event Creator's Emal Address in 'From' Field

  • Dryfive
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 4 months ago #73802 by Dryfive
Thanks!

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #73812 by Russell Noble
Replied by Russell Noble on topic Use Event Creator's Emal Address in 'From' Field
Clarification, does this send a notification to the event owner (I've seen that listed in the new features which is great)? Does it also use the event creator's email address as the From: field in e-mails to registrants, or does it still use the system wide default from: address?

Thanks,
Russell.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
9 years 4 months ago #73844 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Use Event Creator's Emal Address in 'From' Field
It doesn't. However, it add the event creator to reply-to of the email. So if registrant receive email, then click on the Reply button in their mail client to send email, that email will be sent to event creator email


Please note that it will only works like that for event creator is normal registered users on your site. If event creator has super admin permission (for example, if you are super admin), there will be no additional email sent to event creator

Tuan

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #73912 by Russell Noble
Replied by Russell Noble on topic Use Event Creator's Emal Address in 'From' Field
Tuan,
more testing and found the ICS file still uses the system address.
For my site I've update sendEmails() so that it will use the creator's address.
Code:
... $ICSfromEmail = $fromEmail; $ICSfromName = $fromName; if ($event->created_by) { $eventCreator = JUser::getInstance($event->created_by); if (!empty($eventCreator->email) && !$eventCreator->authorise('core.admin')) { $mailer->addReplyTo($eventCreator->email); $ICSfromEmail = $eventCreator->email; if (!empty($eventCreator->name) { $ICSfromName = $eventCreator->name; } } } ... $ics->setName($event->title) ->setDescription($event->short_description) ->setOrganizer($ICSfromEmail, $ICSfromName) ->setStart($event->event_date) ->setEnd($event->event_end_date);

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
9 years 4 months ago #73935 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Use Event Creator's Emal Address in 'From' Field
OK. I will update the code for ICS file as well. It makes sense, thanks for sharing

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc