Gmail is always a pain when it comes to sending with SMTP. Consider using another mail service or at least review the instructions: https://support.google.com/a/answer/176600?hl=en
What is your exact error by the way? What's in logs?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i am trying to send a mail using gmail but it doest work it's not sending within the execution time i have this in my env file
MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME= my personal email MAIL_PASSWORD= my app password MAIL_FROM_ADDRESS=my personal email MAIL_FROM_NAME="${APP_NAME}"
this is my mailable
use App\Models\Order;
class orderplaced extends Mailable { use Queueable, SerializesModels;
public $order;
/**
* Create a new message instance.
*/
public function __construct(Order $order)
{
$this->order = $order;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Orderplaced',
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
view: 'emails.orderplaced',
);
}
Mail::to('[email protected]')->send(new orderplaced($order)); and this is how im sending it can sombody help me find out why it is not working
Please or to participate in this conversation.