Should I use Queue for sending email through 3rd party service - php

Laravel and Lumen provide a Queueing mechanism for queueing tasks that take more processing so that the performance of web-app is not affected during busy times.
But when using 3rd party Emailing service like SendGrid, Gmail.
Should I queue Email Sending through 3rd party? I don't know whether it'd take as much processing on my Laravel Web-App as self-hosted Email Sending does?

It totally depends on situation.
Suppose you need to verify a user's email address so the verification email should be send in real time. Now another situation, you have to send a newsletter, so you can send it any time. So it totally depends on the importance of the email.
Here can read about different email types, https://www.mailjet.com/docs/email_types

Related

Basic Node.js app on Heroku - free way to send emails?

I am making a basic web app on Heroku and want to be able to send basic emails. I am coming from PHP but trying to write this one in node.js. I am used to PHPMailer. I have a gmail account that I want to send a certain email from every time a certain page is accessed. Nodemailer and postmark all seem to have costs associated - is there a 100% free option that I could use to send from Gmail? Else I may just do this in PHP.
Thank you
Add a POST endpoint to your Node router to submit the data to be used to create a message and use a library with support for SMTP with TLS/SSL security like emailjs to send standard SMTP emails via accounts like Gmail (you will need to enable third party apps in the security settings for the Gmail account). There is likely more than one library option but I am recommending one that I've used for a few years myself:
emailjs Lib for Node
https://www.mailgun.com/ is a service similar to postmark. They provide a simple REST API to send email and their free plan allow you to send 10,000 emails per month. Depending on the volume you want to send, this can be a viable solution for you.

Send a mail on every chat message

I am currently using pubnub chat in one of the my application. And now I want to add functionalities like on each and every chat message I want to send mail,same as upwork website is doing.
For the same I have contacted pubnub support but they are not providing any such feature, So I need to send mails from my end, mostly by calling ajax and send mail from php.
But the major issue here is as its chat feature may I need to send number of mails (mass mail) in very short time. So my server doesn't supports it.
So how to implement mass mailing.
Check Out PubNub BLOCKS
PubNub BLOCKS is a set of customizable microservices that give
developers a simple way to add code and deploy features for realtime
apps. PubNub BLOCKS execute business logic directly on the data
streaming through PubNub’s network without splitting it off to an
intermediary server controlled by the customer. This revolutionary
approach streamlines app development, reduces endpoint-to-endpoint
latency, and allows apps to better leverage the enormous scalability
of PubNub’s Data Stream Network.
Sending email (or a Tweet, SMS, etc) with every published message, or only messages with an attribute such as email=true, is something that will be implemented as a BLOCK that you will be able to use out-of-the-box. Custom BLOCKS can be implemented to do whatever else you need to do for every message or certain messages without your server(s) getting invovled.
With cakePHP I would suggest saving the E-Mails to be sent in a queue with a short Ajax call. This can be done with a json view. Then you can create a cron that calls the CakePHP Shell to send the mails with the standard CakePHP Mailer.
If the Mails are time-critical or you don't have access to the server (cron) you can also send the mails directly on the ajax call. The advantage of the cron is that the call (from the browser) is short and that the mails (depending on the server) might need more time to be sent.
Here is an answer that might help you implementing it.

Can i use Google App Engine as a replacement for Google Apps to send email from php-driven webapp?

Righty, I'll use bullets to make this as clear as possible!
My application lives on my server (and doesn't use G.A.E)
Currently I use Google Apps (paid) as my mail server in PHP, it's great but...
It's limited to ~2000 emails per day, i need to send more in the forthcoming version of my web app.
.
Can i use GAE's just for emailing via their remote api?
Can i view the sent/received email in Gmail like i can with Google Apps?
Am i totally barking up the wrong tree?!
Yes you can send emails from GAE, even in PHP. You need a valid Gmail or Google Apps account to use as sender address.
Things to note:
The cost of one email is $0.0001.
The size of sent/received emails add to the bandwidth cost.
There are quotas, varying for free apps and billable apps. Free
app limit is 100/day, billable app quota is 20,000/day. (You need to
pay the first bill in order to go beyond free quota limit, even if
you already enabled billing). You need to have premier account to go
beyond 20,000/day limit (they might approve it without premier
account if you ask them.
There are technical limits.
No, emails sent from GAE do not show up in senders outbox.
Update: GAE can send emails and is pretty good at that. But it's not a generic SMTP server, so it's not a drop-in replacement for services like mailgun. Also it does not do "value-added" mail services, like maillist management, tracking, etc.. This is all doable but you have to code it yourself.

Email to Sms Sending Script using number#service_provider

I have use one service like sending sms to user like number#service_provider (123456#pcs.asa.com) and i am sending a message as email and working fine but getting this message one day or two day after not immediately and also i think this service use only in USA so any one have any idea why i am getting late response by this service.
I am using mine-construct to sending mail and i am using this site for getting provider info Service Provider Info
Have you tried looking into a reliable SMS gateway service such as Twilio? I have used their services and have found them to be very reliable as well as having various SDK's prebuilt for different programming languages.

Sending forgot password emails

I am building a service that will have a 'forgot my password' feature. In addition to that, it will also email users when results are ready from my service.
I would like to ensure delivery of my emails so I was looking around to find a service that would let me send emails.
All that I've been able to find so far are services that require a user to opt-in to a list.
In other words, I've been unable to find any that will let me send customized messages to individual users.
I am currently using swiftmailer for php but would really like to find a service to do this...Anyone know of one?
Edit1: It's not that I don't like swiftmailer but more that I want to make sure I do not have my emails end up getting blocked by spam filters. Also, it would be easier to rely on a service that already has the stuff setup that Atwood talked about in that article.
A very low volume solution that I use, and by low volume, I mean under twenty pieces per day, is to setup a GMail account and send your messages from that account. There are plenty of very simple programmatic solutions for this. Just Google for "php gmail send" and take your pick!

Categories