Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
multi-event-cfp.bitkit.dk
httpdocs
app
Mail
File Content:
AbstractSubmittedMailToUser.php
<?php namespace App\Mail; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; use App\Models\Abstracts; use App\Models\Event; use Illuminate\Support\Facades\Log; use App\Lib\EmailSetupHelper; class AbstractSubmittedMailToUser extends Mailable { use Queueable, SerializesModels; const KEY_TO_NEW_USER = "abstract_submitted_to_new_users"; const KEY_TO_EXISTING_USER = "abstract_submitted_to_existing_users"; protected $abstract; protected $event; /** * Create a new message instance. * * @return void */ public function __construct(Abstracts $abstract, Event $event, $userEmail = null, $abstractRoles = null, $userType = null,$password = null) { $this->abstract = $abstract; $this->event = $event; $this->password = $password; $this->userEmail = $userEmail; $this->abstractRoles = $abstractRoles; $this->userType = $userType; $this->emailSetup = new EmailSetupHelper(); } /** * Build the message. * * @return $this */ public function build() { Log::info("buildmail ".$this->userType); //Get the email configurations using key and event id $emailContents = $this->emailSetup->getEmailData($this->event->id,$this->userType == 'existing' ? self::KEY_TO_EXISTING_USER : self::KEY_TO_NEW_USER); $logo = config('app.url') . '/' . $this->event->theme['logo']['value']; $eventHeader = $this->event->event_name; $submitter = $this->abstract->users('abstract_submitter')->first(); $eventUrl = $this->event->eventUrl('submitter'); $abstractUrl = $eventUrl . "abstract/{$this->abstract->id}/preview"; Log::info($eventUrl); Log::info($abstractUrl); $abstractViewLink = $this->emailSetup->formatLinks($emailContents->body,'abstract_view_link_title',$abstractUrl); $eventViewLink = $this->emailSetup->formatLinks($emailContents->body,'event_view_link_title',$eventUrl); $variables = [ 'roles' => $this->abstractRoles, 'event_name' => $this->event->event_name, 'submitter_name' => $submitter->name, 'submitter_company' => $submitter->company, 'abstract_view_link' => $abstractViewLink, 'event_view_link' => $eventViewLink, 'username' =>$this->userEmail, 'password' => $this->userType != 'existing' ? $this->password : '', 'abstract_id' => $this->abstract->id ]; $subject = $this->emailSetup->formatEmailBody($emailContents->subject,$variables); $body = $this->emailSetup->formatEmailBody($emailContents->body,$variables); $body = $this->emailSetup->removeLinkTitleFromBody($body,'abstract_view_link_title'); $body = html_entity_decode($this->emailSetup->removeLinkTitleFromBody($body,'event_view_link_title')); // if ($this->userType == 'existing') { // $body = " // <p> // Hi,<br/><br> // You have been added as <b> {$this->abstractRoles} </b> // to a new // submission for the event <b> {$this->event->event_name} </b> // by {$submitter->name} // , {$submitter->company}. // <br><br> // To view the abstract, please click <a href={$abstractUrl}>{$abstractUrl}</a>.<br><br> // You can login to the {$this->event->event_name} // using the below details to amend your // profile:<br><br> // Link : <a href={$eventUrl}>{$eventUrl}</a><br> // Username : {$this->userEmail} <br> // <br> // Thank you,<br> // {$this->event->event_name} Team<br> // </p> // "; // } else { // $body = " // <p> // Hi,<br/><br> // You have been added as <b> {$this->abstractRoles} </b> // to a new // submission for the event <b> {$this->event->event_name} </b> // by {$submitter->name} // , {$submitter->company}. // <br><br> // To view the abstract, please click <a href={$abstractUrl}>{$abstractUrl}</a>.<br><br> // You can login to the {$this->event->event_name} // using the below details to amend your // profile:<br><br> // Link : <a href={$eventUrl}>{$eventUrl}</a><br> // Username : {$this->userEmail}<br> // password : {$this->password}<br> // <br> // Thank you<br> // {$this->event->event_name} Team<br> // </p> // "; // } return $this->from(config('app.admin_mail', 'Admin'), $this->event->event_name) ->subject($subject) ->view('emails.admin.abstract_submitted_user') ->with([ "body" => $body, "eventHeader" => $eventHeader, "logo" => $logo ]); } }
Edit
Download
Unzip
Chmod
Delete