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

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.

Related

How to sync Laravel Application with Email Server

I am trying to Create a Mail Box for each user and each user account will be connected to his email(Gmail, Outlook, etc). Now I am trying to connect email in real-time whenever they receive an email they also get in their mailbox. I can get receive the email through IMAP but it is not real-time I have to look for a new email after a specific time. I am looking for a package or library that can do it easily for me or any other solution. After searching I get only one solution which is IMAP and I also implemented it but now I need another solution that fits exactly. If anyone has any idea pls share. and what if I set up my own custom email server with a custom domain so how can I create such functionality with Laravel.
Why I am doing all this?
beceause I want this real time when ever user receive email his ticket will be created on behalf of email it does not need to wait until IMAP fetch and then ticket will be created or displayed.
Thanks in advance.
You do not really have any other option besides IMAP, unless you want to pair with specific services like Exchange Web Services.
PHP has a very comprehensive set of functions regarding IMAP. I would suggest checking it out. Unfortunately, there is not really anything you can do from within PHP to prevent having to poll.
My suggestion is checking in the background if new mails have arrived. For example by checking from within a cronjob. That way you don't have to initiate a new connection to an IMAP server every time a users visits the page.
IMAP docs

Laravel Email Sending : SMTP or Google developer APi?

I was trying to send email from my laravel application where i used google SMTP configuaration in my .env. There is google developer API for sending Email also. Which one is better to use for sending Email SMTP or Developer API from Laravel Application?
Google Developer API (PHP) : https://developers.google.com/gmail/api/quickstart/php
I think if you just need to send an email the best choice is using SMTP, however, if you need to create and send an email at the same time you'll need to able manage mailbox, manage setting etc that will be the case you need to use the Developer API.

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.

Easiest option to send emails from PHP?

I am developing social service in Drupal. There is need to send notifications to registered users.
Which option would be the easiest to integrate Drupal with and to send notifications to users?
Amazon SES,
Google App Engine,
third party provider (like Sendgrid/PostageApp/CritSend)
SES/GAE are clear winners from business point of view.
This question is about which option would be the easiest to integrate with PHP code and which would provide least headache.
Please note that third party providers are not that easy to maintain, as they might drop emails without right MTA relay (unfortunately I experienced that problem with Sendgrid and another PHP service).
I would recommend you to use SwiftMailer, a PHP library that can easily send mails via any SMTP server, SendGrid will provide you with an SMTP server that you can use I believe.
in my opinion app engine(python). only a couple lines of code to create webservice to send out e-mail in python.
you just do simple post from cURL via PHP to sent email. easy as pie. Maybe later I will post a little snippet to achieve this :P.
These days, handling email in house is a royal PITA. I recommend mailchimp instead.
Just want to throw PostageApp's hat into the ring. We've got some documentation on integration with PHP and our API is one of the cleanest and easiest to use around.
We're also exploring an integration with Amazon SES to capitalize on their great prices (And the free option!) so you might be able to use both? Happy to answer questions should you have any.

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