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.
Related
I've been using a PHP script to access Google's SMTP and IMAP so that emails sent from the script page are copied to the client's Gmail sent items. However Google has now locked down and locked out "insecure apps" which also seems to lock out my script, no matter which settings I change in Gsuite or the gmail account. How would I make it a "secure app" given that the usual app password approach seems inapplicable, since the device is a web server?
Securing your App would consist on using the more secure OAuth2 protocol to make requests to the Gmail API or authenticate to the SMTP or IMAP.
Using the Gmail API is more user friendly and for your use case I think it's more indicated. You can start building a Gmail App using these tutorials.
Read these articles to know more about OAuth on Gmail Apps:
IMAP/SMTP
Google APIs
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.
I need to configure Mailgun for sending emails in SuiteCRM using a Campaign. I have completed the domain registration and I now need to integrate Mailgun with SuiteCRM.
Where should I add the API key? Is it possible to integrate this API with SuiteCRM?
You should be able to get SMTP credentials from your Mailgun dashboard (Under "Domains") and use them for suiteCRM. This is what I'm doing; do you need more/different integration?
I'm trying to create an application that uses Google OAuth for login, and then scans through the users email to see the last time they emailing certain people.
So the user logs in with Google OAuth, and then inputs johndoe#gmail.com --> I want to be able to search through their gmail to tell them the last time they spoke.
I can get "feeds" of their inbox, and other folders, but I can't find a way to query for an email.
Yes you can access a user's mail with OAuth and the IMAP protocol. There is specifications on how to use the OAuth and IMAP combination on developers.google.com, check the links from here: https://developers.google.com/google-apps/gmail/oauth_overview
PHP has good support for the IMAP protocol: http://php.net/manual/en/book.imap.php
You can use imap_search() in PHP for searching for messages with IMAP: http://www.php.net/manual/en/function.imap-search.php
Edit: Sorry, the PHP IMAP support does not work with OAuth. You should use the Zend_Mail_Protocol_Imap, which has the functionality to authorize with an IMAP server using OAuth. Using the method requestAndResponse, it is possible to make an IMAP SEARCH request.
I want to know the PHP coding for sending the messages to the mobile port.
Try searching first?
SMS from web application
To send sms from the php to the mobile you need to use any mobile solution provider like clickatell.com
They provides all the api details and sample code though which you can send sms.