64 lines
No EOL
2.5 KiB
PHP
64 lines
No EOL
2.5 KiB
PHP
<?php
|
|
namespace App\Mail;
|
|
|
|
use App\User;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
class MailReleaseAccount extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
protected $user;
|
|
public $subject;
|
|
|
|
|
|
public function __construct(User $user)
|
|
{
|
|
$this->user = $user;
|
|
$this->subject = 'Neuer Berater Registrierung prüfen';
|
|
}
|
|
|
|
|
|
public function build()
|
|
{
|
|
$content = __(strtoupper($this->user->account->salutation))." ";
|
|
$content .= $this->user->account->first_name." ".$this->user->account->last_name."\n";
|
|
$content .= $this->user->account->address."\n";
|
|
$content .= $this->user->account->zipcode." ".$this->user->account->city."\n";
|
|
$content .= $this->user->account->country_id ? $this->user->account->country->de."\n\n" : "\n\n";
|
|
if($this->user->account->phone){
|
|
$content .= "Telefon: ";
|
|
$content .= $this->user->account->pre_phone_id ? $this->user->account->pre_phone->phone." " : " ";
|
|
$content .= $this->user->account->phone;
|
|
}
|
|
if($this->user->account->mobil){
|
|
$content .= "Mobil: ";
|
|
$content .= $this->user->account->pre_mobil_id ? $this->user->account->pre_mobil->phone." " : " ";
|
|
$content .= $this->user->account->mobil;
|
|
}
|
|
$content .= "E-Mail: ".$this->user->email;
|
|
|
|
|
|
$copy1line = "Ein neuer Berater hat sich Registriert und wartet auf die Überprüfung und Freigabe seiner Daten."."\n";
|
|
$copy1line .= "+ Überprüfung Ausweisdaten"."\n";
|
|
$copy1line .= "+ Überprüfung Gewerbenachweis"."\n";
|
|
$copy1line .= "+ Eintrag Account ID"."\n";
|
|
$copy1line .= "+ Überprüfung Karriere-Level/Sponsor"."\n";
|
|
$copy1line .= "+ Überprüfung Rechnungsdaten"."\n";
|
|
|
|
$copy1line .= 'Nach erfolgreicher Überprüfung mit dem Button "Daten vollständigt => Berater freischalten" den Berater freischalten.'."\n";
|
|
$copy1line .= 'Der Berater erhält eine Mail, dass sein Account freigeschaltet worden ist. In den Vertrag wird automatisch mit den eingetragenden Inhalten erstellt.'."\n";
|
|
|
|
return $this->view('emails.info')->with([
|
|
'url' => route('admin_lead_edit', $this->user->id).'?show=check_lead',
|
|
'title' => 'Berater Registrierung prüfen',
|
|
'button' => 'zur Berater Prüfung',
|
|
'copy1line' => $copy1line,
|
|
'copy2line' => __('email.copy2line'),
|
|
'content' => $content,
|
|
]);
|
|
}
|
|
} |