how to send email using mailgun php code - email

I want to send Email with the help of mailgun using php script. I have already made my account on mailgun site and added my domain and verified my domain. I also have my domain and api key with me .. but how to use these in the php script code
Where to get this vendor/autoload.php I am not able to find it on gihub which is shown in liberary page of mailgun website. I am new to MailGun and I have a hosted site and wanted to use the mailgun for my email sending thru PHP script code, but I am not understanding how to send it. The example code shown in mailgun site tells that start code from vendor/autoload.php and then use mailgun\mailgun and i am not understanding how to get these files and where to copy them. I have already made my account on mailgun site and added and verified my domain and i also have my domain and api key.. but how to use these in the php script code/
Can you please help me how to start and where to get all these files, pleas help? thanks in advance

The vendor/autoload.php can be added by running composer, all info is on the mailgun website https://documentation.mailgun.com/libraries.html#php

Related

How to send email in reactjs

So I'm trying to create a forgot password feature and I want to send email to user for verification. The problem is how should I do that? I've tried frontend services like emailJS but that didn't work because you pre-define where the emails are sent. I need it to be sent to the user, not me.
I've also tried backend services like nodemailer but with nodemailer I have to generate a code on the backend, send it to the frontend and on the email. The problem with this is that if someone gets access to anothers email he can click forgot password and get access to the code by looking at request sent to the backend in the chrome's dev tools
So now I'm stuck trying to figure this out. Can anyone help me?

Magnolia cms Gmail configuration?

I want to be able to send emails from Magnolia CMS using a Gmail account. What are the steps to follow?
I am having authentication issue when trying to verify the setup by sending a test email.
Here are the steps for dummies:
Back in Magnolia, go to your user profile and provide an email. That’s where the test email will be sent to (see step 7) /admincentral#app:security:systemUsers;/:treeview:
Back in your Gmail account: settings: allow IMAP
Back in Magnolia, go to the mail app: /admincentral#app:mail:main;
Add your SMTP settings (auth via SSL worked for me) as described here
Always in Magnolia, try to send a test email: /admincentral#app:mail:verify;
Back in your Gmail account: receive that warning email from Google (see screenshot) & follow the link in that email to allow "less safe apps"
Back in Magnolia, try to send a test email again /admincentral#app:mail:verify;
Voila :)
Note: the /admincentral* are the url path to jump directly to the relevant section of admin central, this is only informative & hopefully will help you save time.
Resources
Magnolia CMS mail module: documentation.magnolia-cms.com/display/DOCS/Mail
support.google.com/mail/answer/7126229?visit_id=1-636117997050481062-4194544010&rd=2
support.google.com/a/answer/176600?hl=en

PHPMailer hosting site using 123-reg

basically I'm hosting my site on 123-reg and have a contact form on my site which i want people to send me emails to my live.co.uk email address, i was using the basic php mail() but found all emails are constantly going into junk folder which i rather it go into inbox so was told to use phpmailer
looking into phpmailer i get to the code which asks for smtp but I'm lost with this as I'm not sure what i should be putting for the host username and password as i want the website to send emails to a given email address , any advice on what i should be putting this and why would be great
Thank You
You don't need to use SMTP - you can use a local mail server and call isMail() instead of isSMTP() - though you don't even need to do that since it's the default. In the examples folder provided with PHPMailer, look at the one called mail.phps.

Sending locally sent email (with sendmail) to Google Apps Mail Server

I have a domain, call it mydom.com.
A while ago I started using Google App's email server. I set up MX and the rest of the stuff records as Google wanted, and all is working well since.
On www.mydom.com I have a website, DNS and still running mail server (which basically doesn't do much).
Among other things, on www.mydom.com, I have some contact form - basic php page that takes user's input and sends it to predefined email address at mydom.com. It sends it with php's sendmail function.
My issue is - all those email that get sent from localhost to *#mydom.com (by php's function, or possible by some cron jobs reporting some issues) DO NOT go to Google's email servers but instead get picked up by localhost and it's mail server.
So far, I was resolving this issue by setting up a new mail account at Google account, which was basically calling my local mail server by it's IP address, logging into old, abandoned email account and pulling those misplaced emails to the new, #mydom.com account at Google App.
Obviously I'm missing some entry either in local DNS, host file or something..
Does anyone know how do I fix it?
Hey, the same question was asked here: https://serverfault.com/questions/102647/sendmail-to-local-domain-ignoring-mx-records-part-2
and the answer to it works for me, don't forget to include the dot after the domain!
If it doesn't work to the test call and see how the mail traces.
best of luck, svullo

Using Google Apps Email in CodeIgniter

How do I use Google Apps' email services to send mail using the CodeIgniter email class? The email class seems to prefer SMTP, and I was going through the clients Google Apps account. I can't find any place within the Google Apps settings for SMTP. Does anyone know of a solution for this issue?
Right you don't find it because CodeIgniter uses the "mail" PHP function.
For some reasons only the most drunken PHP core developer knows about - this function do not support SMTP and worse even the admin can't configure SMTP usuage on Unix (it is possible to do this on windows - making the PHP design look even more crazy).
There are a few SMTP libraries out there that can handle SMTP Email, just use them
http://pear.php.net/package/Mail
http://sourceforge.net/projects/phpmailer/
http://swiftmailer.org/
or the Email classes from the Zend Framework which are uncoupled from the rest so easy to use with CodeIgniter.
Here is a blog post detailing instructions:
http://joelg.info/sending-email-with-gmail-using-the-codeignite
Extract From link:
Why send email with Gmail rather than
the server's SMTP configuration? There
are a number of advantages I see for
doing this: Ability to develop locally
and test email sending functionality
without going to lengths to setup a
local mail server. Ability to utilise
Google Apps emails to send email from
emails which are on your own domain.
Ability to have a reference of the
mail you send using this method in the
"sent" folder on your Gmail account.