I have Mailer functionality built into my business app. I'm using smtp to send out client emails. The emails should be send from the client email address but instead are sent from the system. I do not have a default from address in my mail config file
Mail class:
public function build()
{
$e_name=$this->name;
$e_email=$this->email;
$e_number=$this->number;
$e_subject=$this->subject;
$e_massage=$this->massage;
return $this->view('layout.sendmail')
->from($e_email)
->replyTo($e_email)
->subject($e_subject)
->with(compact('e_name','e_email','e_number','e_massage'));
}
Controller: Mail::to('example@gmail.com')->send(new SendMail($name,$email,$number,$subject,$massage));
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community