- Posts: 70
- Thank you received: 0
Use Event Creator's Emal Address in 'From' Field
- Dryfive
- Topic Author
- Offline
- Senior Member
-
Less
More
9 years 4 months ago #73802
by Dryfive
Replied by Dryfive on topic Use Event Creator's Emal Address in 'From' Field
Thanks!
Please Log in or Create an account to join the conversation.
- Russell Noble
- Offline
- Premium Member
-
Less
More
- Posts: 103
- Thank you received: 5
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.
Thanks,
Russell.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
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 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.
- Russell Noble
- Offline
- Premium Member
-
Less
More
- Posts: 103
- Thank you received: 5
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.
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
-
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
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.