Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hjortur17's avatar

Mail not sending emails with the same domain

Hi, my domain is parkandfly.is and I'm trying to send email to [email protected] when a booking is created. But for some reason I'm not receiving those emails, I tried to add my to cc and I that worked. Any ideas how to fix this?

0 likes
16 replies
Cronix's avatar

Some basic questions need to be answered first, such as how you have it all set up, and what mail service you are using to send email out. You keep asking some pretty generic questions without supplying the basic info people need to answer.

My car didn't start this morning. Any ideas how to fix this?

No one can answer that with the given info.

hjortur17's avatar

Sorry about that, here is my .env config

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=username
MAIL_PASSWORD=password

And here is how I'm sending mail:

Mail::to($current->email)
            ->cc('[email protected]')
            ->cc('[email protected]')
            ->send(new BookingConfirmed($current));

NOTE: I'm receiving emails to [email protected]

Neven's avatar

Hi, try this in your .env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.parkandfly.is   //here the change
MAIL_PORT=587
MAIL_USERNAME=username
MAIL_PASSWORD=password

and i think you can send multiple cc this way :

->cc('email-1','email-2')

this is the documentation : https://laravel.com/docs/5.8/mail#queueing-mail

but i personnaly use an "other method" :

$data = //my data or $request
Mail::send('emails.blade-vue', compact('data'), function ($message) use ($data) {
    $message->from('[email protected]', 'Title')
    ->to($data->email)
    ->bcc([email protected])
    ->subject('Subject of the mail');
});
hjortur17's avatar

Changing it to smtp.parkandfly.is did not work.

Snapey's avatar

Who are you sending the email as

siangboon's avatar

parkandfly.is mx record is pointing to google mail, your first configuration look good but as my expereince i still haven't figure out how can send email using gmail after google had some security updates. I think you better use other standard smtp server as workaround.

Snapey's avatar

I ask who you are sending as, because if you send from google using the same account name then the mail never turns up in Inbox. You have to look in Sent instead !

siangboon's avatar

not true, user can send email (gmail or hotmail also can) to themselves, it'll appear at the inbox as usual.

Snapey's avatar

Well clearly you are able to send via google smtp to your own email address. If its not turning up in another gmail account then its likely to be in spam, or that other address does not exist.

Or, as I say, from experience if gmail thinks thats one of its own addresses it will be in Sent.

hjortur17's avatar

Not in the SPAM folder or SENT. Do you know any good free smpt services?

siangboon's avatar

ya, use sendgrid could help you to test out whether is a functionality issue or email provider issue.

siangboon's avatar

what is the question? and it may be better to close this thread if you have solved the problem as stated on the thread title initially and open another thread if there are different problem

Please or to participate in this conversation.