Amazon SQS queue Not sending mail on my id - php

I am working on laravel 4.2 and I am new with SQS queue,my code works fine also i can see my queues in aws console but it not sending mail on my email id "ibrar#whiterabbit.is". I am using mandrill for sending mail.
Mail::queue($template, $data, function($m) use ($data, $subject, $admin_email, $site_title) {
$m->from($admin_email, $site_title);
$m->to("ibrar#whiterabbit.is", "ibrar#whiterabbit.is");
$m->subject($subject);
});
I also try that code but the problem is same, after Queue::push its not come in Mail::send
Queue::push(function($job) use ($data) {
Mail::send($template, $data, function($m) use ($data, $subject, $admin_email, $site_title) {
$m->from($admin_email, $site_title);
$m->to("ibrar#whiterabbit.is", "ibrar#whiterabbit.is");
$m->subject($subject);
});
});

In my opinion SQS is a simple queuing service and i use it for that like RabbitMQ for example. You can push an E-Mail to your queue but you have to process them.
To send an E-Mail you have to use SES. AT the moment you push your Mail to your queue but you don't send it.
SES is a simple Mail system you can send your mails over smtp directly to SES witch send your mail. But its possible that i didn't understand your question correctly.

Related

My Laravel mail queue gets proccessed but don't send email

please some one should help ive done all required to setup my mail queue.
on my route:
Route::get('/test-mail', function () {
Mail::to('***********#xxxx.com')->queue( new App\Mail\testMail());
echo "sent";
});
the mail is queued and stored in the DB and with my listener, i can see it is processed successfully but the mail for reasons i don`t know, is not received at my mailbox.
enter image description here

Sending Emails to Many Recipients in The 1000's Using Laravel and Mailgun

I am using Laravel 5.5 and Mailgun. I want to send email campaigns to over 700 recipients and likely this list will grow into the thousands. Currently I am looping through each email address and sending the emails one at a time. As a result usually only about 530 emails go out. I have searched the net and cannot seem to find a good explanation on how to approach this in a more efficient way so that all the emails are sent. Any suggestions would be greatly appreciated.
public function mailCampaign()
{
//Code to get all email data in JSON
$emails= json_decode($data->getBody());
$baseUrl = config('constants.base_url');
foreach($emails as $key => $email){
Mail::to($email)
->send(new EmailInstance($variable, $email, $baseUrl));
}
$data = ['message' => 'Success. Emails have been sent.'];
return response()->view('emails.mail', $data, 200);
}
You shouldn't send emails one by one. Use Mailgun API instead. You can send thousands of emails using API with Bogardo/Mailgun package.
Mailgun supports the ability send to a group of recipients through a single API call. This is achieved by specifying multiple recipient email addresses as to parameters and using Recipient Variables.

No Data in Sent Items when sending email using Laravel and IBM Notes

Good day.
I am currently using Laravel 5.3 Mailer and an IBM notes email account.
I was able to successfully sent emails but when I looked at the sent items of the email that I used for sending, there was none.
I am currently using this configuration in .env
MAIL_DRIVER=smtp
MAIL_HOST=ourhostip
MAIL_PORT=25
MAIL_USERNAME=myaccount
MAIL_PASSWORD=mypass
MAIL_ENCRYPTION=
In my controller I am using this code.
$data = "Testing Data";
$email = "email";
$name = "Name";
Mail::send('emails.reminder', ['data' => $data], function ($mail) use ($name,$email) {
$mail->from('fromemail', 'AI');
$mail->to($email, $name)->subject('Testing Email!');
});
Any help would be appreciated. Thanks.
This is just the way SMTP works. When you use Outlook,Thunderbird, etc. to write an email via SMTP and your Notes/Domino Account you can see the E-Mail in your Notes Sent Folder only if you configure an IMAP Connection too.
I'm afraid this is not posible in Laravel.
If you want to have the E-Mail in your IBM Notes Inbox you can send the mail with BCC to your own address (and move it with a mail rule to a folder).

How send Email from server email in laravel 5.3

I am new laravel and i just made a small project of article posting and on user registration i just want to send successfully register email to user email. I searched every where in all tutorials they are giving demo for send mail from gmail and some another email providers. I just want to know is it possible to send the mail simply from server email id ? like cordignator framework:
$this->email->to('rahul#gmail.com')
$this->email->subject('Testing Email')
$this->email->message('hello')
$this->email->send()
set your server mail details in .env file then
run a command php artisan publish
send mail like Mail::to($user)->send(new UserRegister());
and your UserRegister class in app/Mail have one method
public function build()
{
return $this->subject("Welcome to My site")
->view('`vendor.notifications.register`',compact(''));
}
And You can set all message body in resourse/view/vendor/notifications/register
see more on laravel mail

SwiftMailer Sends Mail Very Slowly

I am developing my php website on my own computer using WAMP Server. I am using the Swiftmailer to Send mail. It sends the Mail, But it works very slowly. It sends a single mail in about 8-12 seconds.
I am using the following code
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com',465, 'ssl');
$transport->setUsername('xyzmail#gmail.com');
$transport->setPassword('xyz12345');
$message = Swift_Message::newInstance();
$message->setTo("myownemail#gmail.com");
$message->setSubject("Test Mail from News Page");
$message->setFrom("xyzmail#gmail.com");
$message->setBody("This is the Message Body");
$mailer = Swift_Mailer::newInstance($transport);
if($mailer->send($message))
{
$output_msg = "Message Has been Sent Successfully!";
}
else
{
$output_msg = "Could Not Sent Message!";
}
One Thing I mention here that I am not sending so much text in the message body, I am sending the same single line text, as I have used in the above example.
Why it is working so slow, Is there any problem on my part? or do I need to use any other mail sender tool?
Not sure if SwiftMail is the problem here.
Maybe server configurations does not allow to send e-mails faster. I had a problem like this when i was in a shared server.
Because sending email fast (i.e. every 0,5 secs) can overload the server so the server administrator have configured to send an email every 10 seconds.
Another reason could be for spam security.

Categories