Category : email

I create a user and after created i send an e mail to user to create his/her password. public function create(StoreUser $request) { $data = $request->validated(); $data[‘password’] = Hash::make(Str::random(32)); $user = User::create($data); $status = Password::sendResetLink([’email’ => $user->email]); return xhrResponse($status === Password::RESET_LINK_SENT); } But sending email takes too long (5-6 seconds) so i get my ajax ..

Read more

Using laravel I’m trying to send batch emails with the Mailgun api. $recipients = new Collection(); $subscription_addresses = new Collection(); foreach($request[‘subscriptions’] as $subscription){ $recipients->put($subscription[’email’], (object)array(‘id’ => $subscription[‘id’])); $subscription_addresses->push($subscription[’email’]); } $recipient_chunks = $recipients->chunk(500); $subscription_address_chunks = $subscription_addresses->chunk(500); for($i = 0; $i < count($recipient_chunks); $i++){ $mgClient = Mailgun::create(env(‘MAILGUN_SECRET’), ‘https://’ . env(‘MAILGUN_ENDPOINT’)); $domain = env(‘MAILGUN_DOMAIN’); $params = array( ‘from’ ..

Read more

I’m trying to send emails on Laravel Lumen. My controller is : $data = array(‘name’=>"test"); Mail::send(’emails.confirmation’, $data, function($message) { $message->to(‘[email protected]’, ‘xxx’)->subject (‘Laravel HTML Testing Mail’); $message->from(‘[email protected]’,’Virat Gandhi’); }); return "HTML Email Sent. Check your inbox."; I’ve a simple view with 2 lines of HTML. But when I go on the page (in order to send ..

Read more

When i’m trying to send mail under my route (custom smtp server), I’ve no response from the controller that is sending the mail. My route is pointing on this confirm function. My code : public function confirm(Request $request) { try{ Mail::send(’emails/confirmation’, [ ‘name’ => ‘xxxx’, ’email’ => ‘[email protected]’, ‘comment’ => ‘some data’ ], function ($message) ..

Read more

I’ve a domain and an email address dedicated. I’ve a SMTP server provided by my domain. I’m asking myself if it’s possible to send mail directly with this SMTP server without passing through API like MailGun (because, it’s not free!), and how can I do that ? Thanks ! Sourc..

Read more

I have the need to send mail campaigns with around 100k mails as fast as possible. The listener which processes emails is nothing special: public function handle(object $event) { $message = EmailMessage::query()->findOrFail($event->messageId); $recipients = $message->recipients; $this->sendEmail($message, $recipients); $this->updateStatus($message); } protected function sendEmail(EmailMessage $message, Collection $recipientCollection): void { $queuedEmail = new QueuedEmail($message->subject, $message->body, $message->conversation_uuid); $to = ..

Read more

What am I doing wrong? I have this function that catches a user and if exists, send an email, otherwise, create a new user and then send an email. public function insereNomeEmailFiador(Request $request) { $cpfCnpjHigienizado = str_replace(‘-‘, ”, str_replace(‘/’, ”, (str_replace(‘.’, ”, $request->cpf)))); $socio = User::where(‘cpfCnpj’, ‘=’, $cpfCnpjHigienizado)->first(); if($socio) { $fiador = User::where(‘fiador_id’, ‘=’, $request->contemplado)->first(); ..

Read more

I have just developed a flutter mobile application which is connected to a laravel api, I had a button in the application that sends an email with parameters (content of the fields), so I configured the sending of email from the API, but it does not take into account the parameters my code in reservationcontroller.php ..

Read more

I have the issue in which when I am writing the components in Laravel Mailable, according to their 6.x documentation (since my Laravel version is 6.0). But despite that, in the actual email some components render properly, some are just plain HTML. By plain HTML I mean the text literally says <a>…</a>, but doesn’t render ..

Read more

So I’m running the latest version of Laravel 8 and am having a heck of a time embedding images into the email. In the mail template, I have this: /resources/views/emails/contact-job-post.blade.php <img align="center" alt="Logo" border="0" class="center autowidth" src="{{ $message->embed(‘images/logo.png’) }}" style="text-decoration: none; -ms-interpolation-mode: bicubic; height: auto; border: 0; width: 100%; max-width: 225px; display: block; padding: 30px ..

Read more

Already made all the configuration for this case, installed the illuminate/mail package via Composer using same version as Lumen 8.0. Configured mail server on .env file. Uncommented $app->withFacades(); and $app->withEloquent(); and added: $app->withFacades(true, [ ‘IlluminateSupportFacadesMail’ => ‘Mail’, ]); $app->configure(‘app’); $app->configure(‘mail’); $app->configure(‘services’); $app->register(IlluminateMailMailServiceProvider::class); $app->alias(‘mail.manager’, IlluminateMailMailManager::class); $app->alias(‘mail.manager’, IlluminateContractsMailFactory::class); $app->alias(‘mailer’, IlluminateMailMailer::class); $app->alias(‘mailer’, IlluminateContractsMailMailer::class); $app->alias(‘mailer’, IlluminateContractsMailMailQueue::class); Also already executed ..

Read more