why would you choose to send email through gmail?
It never ceases to amaze me that people are surprised when they get issues
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to send 2 emails when user will submit the contact form.
1 should be sent to the user email & the other should be sent to my own email.
My .env file look like this:
MAIL_MAILER=sendmail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=465
MAIL_USERNAME=m.s***********@gmail.com
MAIL_PASSWORD='************'
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=m.s***********@gmail.com
MAIL_FROM_NAME="${APP_NAME}"
I'm sending the emails from controller like this:
dd($request->email);
Mail::to($request->email)->bcc('[email protected]')->send(new ContactSubmit($contact));
I'm receiving all the emails on [email protected] but not receiving on any other domain.
dd($request->email); is showing me correct emails.
Before I was trying to send emails from my own domain:
[email protected]
But I was receiving this error in my inbox:
SMTP error from remote mail server after end of data:
552 5.2.0 xkfupRYgo20R2xkfupkpjt :CPANEL: Access to this mail system has been blocked for xh******** due to spam activity. Spam was seen coming from this account, and possibly other scripts running in it. For help resolving the issue, see http://x.co/spamclean. Once the compromise has been cleaned, please contact customer support to remove the block.
Please or to participate in this conversation.